src/Transport/Parser.php
private function detectFrameEnd()
    {
        $bodySize = null;
        if ($this->expectedBodyLength) {
            if (($this->bufferSize - $this->offset) >= $this->expectedBodyLength) {
                $bodySize = $this->expectedBodyLength;
            }
        } elseif (($frameEnd = strpos($this->buffer, self::FRAME_END, $this->offset)) !== false) {
            $bodySize = $frameEnd - $this->offset;
        }

        if ($bodySize !== null) {
            $this->setFrame($bodySize);
            $this->offset += $bodySize + strlen(self::FRAME_END); // x00
        }
        return $bodySize !== null;
    }
private function detectFrameEnd()
    {
        $bodySize = null;
        if ($this->expectedBodyLength) {
            if (($this->bufferSize - $this->offset) >= $this->expectedBodyLength) {
                $bodySize = $this->expectedBodyLength;
            }
        } elseif (($frameEnd = strpos($this->buffer, self::FRAME_END, $this->offset)) !== false) {
            $bodySize = $frameEnd - $this->offset;
        }

        if ($bodySize !== null) {
            $this->setFrame($bodySize);
            $this->offset += $bodySize + strlen(self::FRAME_END); // x00
        }
        return $bodySize !== null;
    }
private function detectFrameEnd ( ) { $ bodySize = null ; if ( $ this -> expectedBodyLength ) { if ( ( $ this -> bufferSize - $ this -> offset ) >= $ this -> expectedBodyLength ) { $ bodySize = $ this -> expectedBodyLength ; } } elseif ( ( $ frameEnd = strpos ( $ this -> buffer , self :: FRAME_END , $ this -> offset ) ) !== false ) { $ bodySize = $ frameEnd - $ this -> offset ; } if ( $ bodySize !== null ) { $ this -> setFrame ( $ bodySize ) ; $ this -> offset += $ bodySize + strlen ( self :: FRAME_END ) ; // x00 } return $ bodySize !== null ; }
Detect frame end marker, starting from current offset.

@return bool
Detect frame end marker starting from current offset .