<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > INet > INET_Ping |
Description
Send ICMP data to a remote machine returning result in a form of multiple info inside a string.
Syntax
s = INET_Ping(NameOrIp, msTimeOut, DataToSend [, InfoIDToReturn] )
Returns
String.
Parameters
Name |
Type |
Optional |
Meaning |
NameOrIp |
String |
No |
Name or IP of the remote machine |
msTimeOut |
Number |
No |
Timeout in milli secs |
DataToSend |
String |
No |
Data to be sent, usually a 32 byte string |
InfoIDToReturn |
Number |
Yes |
InfoIDToReturn is a value between 1 to 3. Use this optional parameter to indicate what info to return. See below table for the possible InfoID.
If InfoIDToReturn is zero or not indicated, a string contains all the information separated by $TAB char will be returned. |
Remarks
Information returned are the following:
InfoID |
Name |
Meaning |
1 |
RTT |
Time in milliseconds to ping the host |
2 |
ErroCode |
Error code. Zero means no error |
3 |
ErrorDescription |
Error description in case Erro code is not zero |
If no InfoIDToReturn is specified, function returns a string contains multiple information separated by $TAB char.
Restrictions
See also
Examples