NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: wvanderstek on March 06, 2009, 03:32:16 AM

Title: How to test if server is alive/responding ?
Post by: wvanderstek on March 06, 2009, 03:32:16 AM
We do have several servers running at service providers. We want to write a small program to see if these servers are still alive. Could anybody give a clue how to do that ?

All the servers are only listening on port 443.

Thanks,
Wilco
Title: Re: How to test if server is alive/responding ?
Post by: Robert Iliuta on March 06, 2009, 03:43:24 AM
Hallo,


I do a fetch,

FetchServer.Fetch('https://127.0.0.1:7070')

If you get error then the server is close else is open.

It works very good for me.


Regards,
Robert
Title: Re: How to test if server is alive/responding ?
Post by: wvanderstek on March 06, 2009, 03:55:30 AM
Hello Robert,

Thanks for the fast reply. Could you tell me where you FetchServer is located, caues I do get an unknown procedure label when compiling. I have looked in the dirs etc, but found nothing.

Thanks,
Wilco
Title: Re: How to test if server is alive/responding ?
Post by: Bruce on March 06, 2009, 07:41:31 AM
Wilco,

Use the NetWebClient class.
ie in Robert's example FetchServer is the name of an object, of type NetWebClient that he's created. You can use the normal NetTalk extension to add a new object.

Also see one of the webclient examples.

Cheers
Bruce
Title: Re: How to test if server is alive/responding ?
Post by: wvanderstek on March 09, 2009, 01:28:26 AM
Great, thanks, I will take a look at it.

Best,
Wilco