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();
}
}