September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool socket_set_timeout(resource socket_descriptor, int seconds, int microseconds)
| socket_descriptor | Socket descriptor |
| seconds | Number of seconds |
| microseconds | Number of microseconds |
Sets the timeout for an open socket.
Returns:
TRUE on success; FALSE otherwise
Description:
socket_set_timeout() sets the timeout value for an open socket. The timeout value is the sum of the seconds and microseconds arguments.
Availability:
UNIX, Windows
Version:
4.0b4+
See also:
To get information about the state of a socket:
socket_get_status()
Example:
socket_set_timeout ($socket_descriptor, 0, 500)
or trigger_error ('Socket timeout could not be altered');
|
Read now
Unlock full access