public function setBlocking($blocking)
    {
        if ($this->blocking == $blocking) {
            return;
        }

        if ($blocking) {
            if (@socket_set_block($this->socket) === false) {
                $this->throwSocketError();
            }
            $this->blocking = true;
        } else {
            if (@socket_set_nonblock($this->socket) === false) {
                $this->throwSocketError();
            }
            $this->blocking = false;
        }
    }
public function setBlocking($blocking)
    {
        if ($this->blocking == $blocking) {
            return;
        }

        if ($blocking) {
            if (@socket_set_block($this->socket) === false) {
                $this->throwSocketError();
            }
            $this->blocking = true;
        } else {
            if (@socket_set_nonblock($this->socket) === false) {
                $this->throwSocketError();
            }
            $this->blocking = false;
        }
    }
public function setBlocking ( $ blocking ) { if ( $ this -> blocking == $ blocking ) { return ; } if ( $ blocking ) { if ( @ socket_set_block ( $ this -> socket ) === false ) { $ this -> throwSocketError ( ) ; } $ this -> blocking = true ; } else { if ( @ socket_set_nonblock ( $ this -> socket ) === false ) { $ this -> throwSocketError ( ) ; } $ this -> blocking = false ; } }
Sets blocking mode on a socket resource

Blocking: When an operation (e.g. receive, send, connect, accept, ...) is performed on a blocking socket, the
script will pause its execution until it receives a signal or it can perform the operation.

Non-blocking: When an operation (e.g. receive, send, connect, accept, ...) is performed on a non-blocking
socket, the script will not pause its execution until it receives a signal or it can perform the operation.
Rather, if the operation would result in a block, the called function will fail.
Exception SocketTryAgain will be thrown when a blocking operation is called.
@link http://php.net/manual/en/function.socket-set-nonblock.php

@param bool $blocking blocking mode

@throws SocketException
Sets blocking mode on a socket resource