private function endRequest(int $requestId, int $appStatus = 0, int $protocolStatus = DaemonInterface::FCGI_REQUEST_COMPLETE): void
    {
        $content = pack('NCx3', $appStatus, $protocolStatus);
        $this->writeRecord($requestId, DaemonInterface::FCGI_END_REQUEST, $content);

        $keepAlive = $this->requests[$requestId]['keepAlive'];

        fclose($this->requests[$requestId]['stdin']);

        unset($this->requests[$requestId]);

        if (!$keepAlive) {
            $this->close();
        }
    }
private function endRequest(int $requestId, int $appStatus = 0, int $protocolStatus = DaemonInterface::FCGI_REQUEST_COMPLETE): void
    {
        $content = pack('NCx3', $appStatus, $protocolStatus);
        $this->writeRecord($requestId, DaemonInterface::FCGI_END_REQUEST, $content);

        $keepAlive = $this->requests[$requestId]['keepAlive'];

        fclose($this->requests[$requestId]['stdin']);

        unset($this->requests[$requestId]);

        if (!$keepAlive) {
            $this->close();
        }
    }
private function endRequest ( int $ requestId , int $ appStatus = 0 , int $ protocolStatus = DaemonInterface :: FCGI_REQUEST_COMPLETE ) : void { $ content = pack ( 'NCx3' , $ appStatus , $ protocolStatus ) ; $ this -> writeRecord ( $ requestId , DaemonInterface :: FCGI_END_REQUEST , $ content ) ; $ keepAlive = $ this -> requests [ $ requestId ] [ 'keepAlive' ] ; fclose ( $ this -> requests [ $ requestId ] [ 'stdin' ] ) ; unset ( $ this -> requests [ $ requestId ] ) ; if ( ! $ keepAlive ) { $ this -> close ( ) ; } }
End the request by writing an FCGI_END_REQUEST record and then removing
the request from memory and closing the connection if necessary.

@param int $requestId      The request id to end
@param int $appStatus      The application status to declare
@param int $protocolStatus The protocol status to declare
End the request by writing an FCGI_END_REQUEST record and then removing the request from memory and closing the connection if necessary .