Aerys\Websocket::onHandshake PHP Method

onHandshake() public method

If a websocket application doesn't wish to impose any special constraints on the handshake it doesn't have to do anything in this method and all handshakes will be automatically accepted. The return value from onHandshake() invocation (which may be the eventual generator return expression) is passed as the second parameter to onOpen().
public onHandshake ( aerys\Request $request, aerys\Response $response )
$request aerys\Request The HTTP request that instigated the handshake
$response aerys\Response Used to set headers and/or reject the handshake
    public function onHandshake(Request $request, Response $response);