src/Rxnet/Httpd/RequestParser.php
public function parseChunk($data)
    {
        if (!$data) {
            return;
        }
        // Detect end of transfer
        if ($end = strpos($data, "0\r\n\r\n")) {
            $data = substr($data, 0, $end);
        }
        $this->buffer.= $data;
        $this->request->onData($data);

        if ($end) {
            $this->buffer = $this->parseChunkedBuffer($this->buffer);
            $this->request->setBody($this->buffer);
            $this->notifyCompleted();
            $this->buffer = '';
        }
    }
public function parseChunk($data)
    {
        if (!$data) {
            return;
        }
        // Detect end of transfer
        if ($end = strpos($data, "0\r\n\r\n")) {
            $data = substr($data, 0, $end);
        }
        $this->buffer.= $data;
        $this->request->onData($data);

        if ($end) {
            $this->buffer = $this->parseChunkedBuffer($this->buffer);
            $this->request->setBody($this->buffer);
            $this->notifyCompleted();
            $this->buffer = '';
        }
    }
public function parseChunk ( $ data ) { if ( ! $ data ) { return ; } // Detect end of transfer if ( $ end = strpos ( $ data , "0\r\n\r\n" ) ) { $ data = substr ( $ data , 0 , $ end ) ; } $ this -> buffer .= $ data ; $ this -> request -> onData ( $ data ) ; if ( $ end ) { $ this -> buffer = $ this -> parseChunkedBuffer ( $ this -> buffer ) ; $ this -> request -> setBody ( $ this -> buffer ) ; $ this -> notifyCompleted ( ) ; $ this -> buffer = '' ; } }
Wait end of transfer packet to complete
@param $data
Wait end of transfer packet to complete