PHPDaemon\Servers\FastCGI\Connection::endRequest PHP Method

endRequest() public method

Handles the output from downstream requests
public endRequest ( object $req, string $appStatus, string $protoStatus ) : void
$req object
$appStatus string
$protoStatus string
return void
    public function endRequest($req, $appStatus, $protoStatus)
    {
        $c = pack('NC', $appStatus, $protoStatus) . "";
        $this->write("" . "" . pack('nn', $req->attrs->id, mb_orig_strlen($c)) . "" . "" . $c);
        if ($protoStatus === -1) {
            $this->close();
        } elseif (!$this->pool->config->keepalive->value) {
            $this->finish();
        }
    }