public function hasActivity()
    {
        if (!$this->isConnected()) {
            return false;
        }
        $read = array($this->socket);
        $write = null;
        $ex = null;
        $result = socket_select($read, $write, $ex, 0, 0);
        if ($result === false) {
            throw new TcpException(
            	'Error selecting from socket: '
                . socket_strerror(socket_last_error($this->socket))
            );
        }
        return !empty($read);
    }
public function hasActivity()
    {
        if (!$this->isConnected()) {
            return false;
        }
        $read = array($this->socket);
        $write = null;
        $ex = null;
        $result = socket_select($read, $write, $ex, 0, 0);
        if ($result === false) {
            throw new TcpException(
            	'Error selecting from socket: '
                . socket_strerror(socket_last_error($this->socket))
            );
        }
        return !empty($read);
    }
public function hasActivity ( ) { if ( ! $ this -> isConnected ( ) ) { return false ; } $ read = array ( $ this -> socket ) ; $ write = null ; $ ex = null ; $ result = socket_select ( $ read , $ write , $ ex , 0 , 0 ) ; if ( $ result === false ) { throw new TcpException ( 'Error selecting from socket: ' . socket_strerror ( socket_last_error ( $ this -> socket ) ) ) ; } return ! empty ( $ read ) ; }
Call this one to see if this peer has any activity in the socket.

@return boolean
Call this one to see if this peer has any activity in the socket .