September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool socket_set_blocking(resource socket_descriptor, bool enable_blocking)
| socket_descriptor | Socket descriptor |
| enable_blocking | Socket blocking mode |
Specifies socket blocking or non-blocking mode.
Returns:
TRUE on success; FALSE otherwise
Description:
socket_set_blocking() switches between blocking and non-blocking mode on a socket. In non-blocking mode, a socket call returns immediately; in blocking mode, the result is suspended until data is sent. The default is blocking mode.
Availability:
UNIX, Windows
Version:
4.0b4+
See also:
To get information about the state of a socket:
socket_get_status()
Example:
socket_set_blocking ($socket_descriptor, FALSE) or trigger_error ('Socket blocking ... |
Read now
Unlock full access