public function onHandshakeRequest(
        Connection $connection,
        string $path,
        string $origin,
        string $key,
        array $extensions
    ): void {
        if (!$this->isAllowed($origin)) {
            $connection->close(Protocol::CLOSE_NORMAL, 'Not allowed origin during handshake request');
        }
    }
public function onHandshakeRequest(
        Connection $connection,
        string $path,
        string $origin,
        string $key,
        array $extensions
    ): void {
        if (!$this->isAllowed($origin)) {
            $connection->close(Protocol::CLOSE_NORMAL, 'Not allowed origin during handshake request');
        }
    }
public function onHandshakeRequest ( Connection $ connection , string $ path , string $ origin , string $ key , array $ extensions ) : void { if ( ! $ this -> isAllowed ( $ origin ) ) { $ connection -> close ( Protocol :: CLOSE_NORMAL , 'Not allowed origin during handshake request' ) ; } }
Handshake request listener
Closes the connection on handshake from an origin that isn't allowed

@param Connection $connection
@param string     $path
@param string     $origin
@param string     $key
@param array      $extensions
Handshake request listener Closes the connection on handshake from an origin that isn t allowed