xHarbour Reference Documentation > Function Reference |
Sets a timout value in milliseconds for a socket.
INetSetTimeout( <pSocket>, <nMilliSeconds> ) --> NIL
The return value is always NIL.
INetSetTimeout() sets the timeout value for a socket, after which a blocking sockets function returns. If the blocking sockets function is not completed withing the timeout period, it returns, and a sockets error of -1 is set.
Refer to function INetSetPeriodCallback() for an example of taking advantage of a timeout value.
Note: high-level sockets functions, like INetRecvAll(), internally call their low-level counterpart INetRecv() multiple times until all data is retrieved. The timeout value is applied to all individual INetRecv() calls, not for the entire INetRecvAll() call.
See also: | INetClearPeriodCallback(), INetClearTimeout(), INetCreate(), INetSetPeriodCallback() |
Category: | Internet functions , Sockets functions , xHarbour extensions |
Source: | vm\INet.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com