Home > PHP > Function > Sockets > socket_set_block()

socket_set_block()

socket_set_block - Sets blocking mode on a socket resource

Syntax

bool socket_set_block (resource $socket)

Arguments

  • socket - A valid socket resource created with socket_create() or socket_accept().

Description

The socket_set_block() function removes the O_NONBLOCK flag on the socket specified by the socket parameter.

Version

PHP 4.2.0, 5

Return value

Returns TRUE on success or FALSE on failure.