bool stream_set_blocking ( resource $stream , int $mode )
Sets blocking or non-blocking mode on a stream. This function works for any stream that supports non-blocking mode (currently, regular files and socket streams).
Returns TRUE on success or FALSE on failure.