コード例 #1
0
 /**
  * @param HttpSocketTransporter $transporter
  * @param HttpResponse          $response
  * @param null                  $continue
  *                              From Events To Tell Just Continue With Body
  *
  * @return mixed
  */
 function __invoke($transporter = null, $response = null, $continue = null)
 {
     ## Close the connection if requested to do so by the server
     $headers = $response->getHeaders();
     if ($headers->has('connection') && strstr($headers->get('connection')->renderValueLine(), 'close') !== false && $transporter->isConnected() && $continue === false) {
         $transporter->close();
     }
 }