Name

socket_set_blocking

Synopsis

int socket_set_blocking(resource socket, bool mode)

If mode is true, sets socket to blocking mode; if mode is false, sets socket to nonblocking mode. In blocking mode, functions that get data from a socket (such as fgets( )) wait for data to become available in the socket before returning. In nonblocking mode, such calls return immediately, even when the result is empty.

Get Programming PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.