_Chris_ Posted September 12, 2006 Posted September 12, 2006 I need code that will test a network connection, i have the ping command and i can get it to ping the gateway to test the connection but i want it to have a timeout to stop testing if the connection dosent work after 30 seconds. Or a cancel button to stop testing connection
nfwu Posted September 12, 2006 Posted September 12, 2006 Read the helpfile! Ping(): Ping -------------------------------------------------------------------------------- Pings a host and returns the roundtrip-time. Ping ( address or hostname [, timeout] ) Parameters address/hostname Can be i.e. "www.hiddensoft.com" or "178.50.76.4". timeout [optional] Is the time to wait for an answer in milliseconds (default is 4000). Return Value Success: Returns the roundtrip-time in milliseconds ( greater than 0 ). Failure: Returns 0 if host is not pingable or other network errors occurred and sets @error. (See Remarks) Remarks When the function fails (returns 0) @error contains extended information: 1 = Host is offline 2 = Host is unreachable 3 = Bad destination 4 = Other errors #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
_Chris_ Posted September 12, 2006 Author Posted September 12, 2006 Sorry i did actually read the help file, i failed to recognise the function of the timeout
blaise Posted September 20, 2006 Posted September 20, 2006 Sorry i did actually read the help file, i failed to recognise the function of the timeout Ping ( address or hostname [, timeout] ) Parameters address/hostname Can be i.e. "www.hiddensoft.com" or "178.50.76.4". timeout [optional] Is the time to wait for an answer in milliseconds (default is 4000). ^^^^^ Did you see it now?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now