src/Ratchet/Http/CloseResponseTrait.php
private function close(ConnectionInterface $conn, $code = 400, array $additional_headers = []) {
        $response = new Response($code, array_merge([
            'X-Powered-By' => \Ratchet\VERSION
        ], $additional_headers));

        $conn->send(gPsr\str($response));
        $conn->close();
    }
private function close(ConnectionInterface $conn, $code = 400, array $additional_headers = []) {
        $response = new Response($code, array_merge([
            'X-Powered-By' => \Ratchet\VERSION
        ], $additional_headers));

        $conn->send(gPsr\str($response));
        $conn->close();
    }
private function close ( ConnectionInterface $ conn , $ code = 400 , array $ additional_headers = [ ] ) { $ response = new Response ( $ code , array_merge ( [ 'X-Powered-By' => \ Ratchet \ VERSION ] , $ additional_headers ) ) ; $ conn -> send ( gPsr \ str ( $ response ) ) ; $ conn -> close ( ) ; }
Close a connection with an HTTP response
@param \Ratchet\ConnectionInterface $conn
@param int                          $code HTTP status code
@return null
Close a connection with an HTTP response