private function onMessage(Request $request, string $buffer = ''): Promise
    {
        \assert($this->logger->debug(\sprintf(
            "%s %s HTTP/%s @ %s:%s",
            $request->getMethod(),
            $request->getUri(),
            $request->getProtocolVersion(),
            $this->clientAddress,
            $this->clientPort
        )) || true);

        $this->pendingResponses++;

        return new Coroutine($this->respond($request, $buffer));
    }
private function onMessage(Request $request, string $buffer = ''): Promise
    {
        \assert($this->logger->debug(\sprintf(
            "%s %s HTTP/%s @ %s:%s",
            $request->getMethod(),
            $request->getUri(),
            $request->getProtocolVersion(),
            $this->clientAddress,
            $this->clientPort
        )) || true);

        $this->pendingResponses++;

        return new Coroutine($this->respond($request, $buffer));
    }
private function onMessage ( Request $ request , string $ buffer = '' ) : Promise { \ assert ( $ this -> logger -> debug ( \ sprintf ( "%s %s HTTP/%s @ %s:%s" , $ request -> getMethod ( ) , $ request -> getUri ( ) , $ request -> getProtocolVersion ( ) , $ this -> clientAddress , $ this -> clientPort ) ) || true ) ; $ this -> pendingResponses ++ ; return new Coroutine ( $ this -> respond ( $ request , $ buffer ) ) ; }
Invoked by the HTTP parser when a request is parsed.

@param Request $request
@param string $buffer Remaining buffer in the parser.

@return \Amp\Promise
Invoked by the HTTP parser when a request is parsed .