protected function receiveHeader()
    {
        if(strlen($this->bufferData) > 8)
        {
            $header = substr($this->bufferData,0,8);
            $this->waitingFor = intval($header);
            $this->bufferData = substr($this->bufferData,8);
            $this->headerReceived = true;
            return strlen($this->bufferData) > 0;
        }
        return false;
    }
protected function receiveHeader()
    {
        if(strlen($this->bufferData) > 8)
        {
            $header = substr($this->bufferData,0,8);
            $this->waitingFor = intval($header);
            $this->bufferData = substr($this->bufferData,8);
            $this->headerReceived = true;
            return strlen($this->bufferData) > 0;
        }
        return false;
    }
protected function receiveHeader ( ) { if ( strlen ( $ this -> bufferData ) > 8 ) { $ header = substr ( $ this -> bufferData , 0 , 8 ) ; $ this -> waitingFor = intval ( $ header ) ; $ this -> bufferData = substr ( $ this -> bufferData , 8 ) ; $ this -> headerReceived = true ; return strlen ( $ this -> bufferData ) > 0 ; } return false ; }
Try to receive header from buffer
on success the next operation is receiveBody
@return bool
Try to receive header from buffer on success the next operation is receiveBody