src/Network/Connection.php
public function hasDataToRead()
    {
        if (!$this->isConnected()) {
            throw new ConnectionException('Not connected to any server.', $this->activeHost);
        }

        $isDataInBuffer = $this->connectionHasDataToRead($this->readTimeout[0], $this->readTimeout[1]);
        if (!$isDataInBuffer) {
            $this->observers->emptyBuffer();
        }
        return $isDataInBuffer;
    }
public function hasDataToRead()
    {
        if (!$this->isConnected()) {
            throw new ConnectionException('Not connected to any server.', $this->activeHost);
        }

        $isDataInBuffer = $this->connectionHasDataToRead($this->readTimeout[0], $this->readTimeout[1]);
        if (!$isDataInBuffer) {
            $this->observers->emptyBuffer();
        }
        return $isDataInBuffer;
    }
public function hasDataToRead ( ) { if ( ! $ this -> isConnected ( ) ) { throw new ConnectionException ( 'Not connected to any server.' , $ this -> activeHost ) ; } $ isDataInBuffer = $ this -> connectionHasDataToRead ( $ this -> readTimeout [ 0 ] , $ this -> readTimeout [ 1 ] ) ; if ( ! $ isDataInBuffer ) { $ this -> observers -> emptyBuffer ( ) ; } return $ isDataInBuffer ; }
Check if connection has new data which can be read.

This might wait until readTimeout is reached.

@return boolean
@throws ConnectionException
@see Connection::setReadTimeout()
Check if connection has new data which can be read .