If response returns the DATE variable, you can calculate the response time.
If you do not like the term PING, we can call it PONG

One thing, as already mentioned, would be to parameterize the number of localhost to search
Giorgio
The response string is set when the ping server is started, so if you used DATE, you would only be able for calculate how long ago the server was started.Giorgio Garabello wrote:In my opinion, ip_ping responds perfectly to the needs of a "ping" even if it is not exactly the same as the "official" ping,
If response returns the DATE variable, you can calculate the response time.
If you do not like the term PING, we can call it PONG
One thing, as already mentioned, would be to parameterize the number of localhost to search
Giorgio
WOW!!!!Martin_Head wrote:Here is an updated version of IP_PING, Version 1.01
The PING command is now named IP_PING.
There is an optional parameter on the end of the commands to set the number of pings to do, and the number ports to use. The maximum allowed value is 10.
If you don't supply the parameter, the commands will default to 10 as in the original program.
Martin
It's possible, but the PSERVE routine would need a bit of re-writing to pick up the current date/time every time it received a ping. But you would loose the ability to return a custom message. Or do you mean you would like the Date and Time tacked onto the end of every message?Giorgio Garabello wrote:I have a question: is it not possible that PSERVE when it receives a request, does it want to retrieve system date and time and return them instead of a default string?
Martin_Head wrote:It's possible, but the PSERVE routine would need a bit of re-writing to pick up the current date/time every time it received a ping. But you would loose the ability to return a custom message. Or do you mean you would like the Date and Time tacked onto the end of every message?Giorgio Garabello wrote:I have a question: is it not possible that PSERVE when it receives a request, does it want to retrieve system date and time and return them instead of a default string?
I suppose you could arrange the PSERVE command, so that if the message reply string was missing, it would default to returning the current Date and Time.
I'm not quite sure why you would want the Date and Time returned, If you want to know the 'round trip' time of the IP_PING command, you would be better reading the time, doing the IP_PING, then read the time again. Then work out the difference.
Martin
good idea!Giorgio Garabello wrote:Martin_Head wrote:It's possible, but the PSERVE routine would need a bit of re-writing to pick up the current date/time every time it received a ping. But you would loose the ability to return a custom message. Or do you mean you would like the Date and Time tacked onto the end of every message?Giorgio Garabello wrote:I have a question: is it not possible that PSERVE when it receives a request, does it want to retrieve system date and time and return them instead of a default string?
I suppose you could arrange the PSERVE command, so that if the message reply string was missing, it would default to returning the current Date and Time.
I'm not quite sure why you would want the Date and Time returned, If you want to know the 'round trip' time of the IP_PING command, you would be better reading the time, doing the IP_PING, then read the time again. Then work out the difference.
Martin