Swoole\Http\Parser::parse PHP Method

parse() public method

头部http协议
public parse ( $data ) : array
$data
return array
    function parse($data)
    {
        $_header = strstr($data, self::HTTP_EOF, true);
        if ($_header === false) {
            $this->buffer = $data;
        }
        $header = self::parseHeader($_header);
        if ($header === false) {
            $this->isError = true;
        }
        $this->header = $header;
        return $header;
    }