IP Ping

Anything QL Software or Programming Related.
User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: IP Ping

Post by Giorgio Garabello »

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 :-D
One thing, as already mentioned, would be to parameterize the number of localhost to search

Giorgio


Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: IP Ping

Post by Martin_Head »

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 :-D
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.

Having a parameter for the number of 'pings' to do, could cause problems. In that you might miss an existing server, if it is using one of the ports that you are not looking at.

You could possibly do it if you had a 'number of ports to use' parameter on both the IP_PING, and PSERVE commands. But you would have to make sure that both emulators running the ping program used the same number.

Martin


User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: IP Ping

Post by Giorgio Garabello »

In my opinion, it is an acceptable risk.
Each of us knows what he has on his own network
For example, I already know that I will never use iplocalnet, but I'm going to create a large network for Italian meetings, to be able to parameterize the number of servers to look for would be really convenient!
You can also predict a default so that the absence of the parameter corresponds to the maximum number of possible pings.


Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: IP Ping

Post by Martin_Head »

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
Attachments
Manuals.zip
(93.14 KiB) Downloaded 138 times
IP_PINGsource101.zip
(5.54 KiB) Downloaded 127 times
IP_PING101.zip
(1008 Bytes) Downloaded 145 times


User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: IP Ping

Post by Giorgio Garabello »

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
WOW!!!!

I'll try it ASAP!!!
many thanks!

Giorgio


User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: IP Ping

Post by Giorgio Garabello »

I did a quick test and everything seems to work well, tomorrow I hope I can do more in-depth tests.

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
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: IP Ping

Post by Martin_Head »

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?
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?

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


User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: IP Ping

Post by Giorgio Garabello »

Martin_Head wrote:
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?
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?

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


User avatar
tofro
Font of All Knowledge
Posts: 2700
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: IP Ping

Post by tofro »

A PING reply, obviously :D


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: IP Ping

Post by Giorgio Garabello »

Giorgio Garabello wrote:
Martin_Head wrote:
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?
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?

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!


Post Reply