Aerys\Websocket\Rfc6455Endpoint::tryAppOnOpen PHP Method

tryAppOnOpen() private method

Any subgenerator delegations here can safely use yield from because this generator is invoked from the main import() function which is wrapped in a resolve() at the HTTP server layer.
private tryAppOnOpen ( integer $clientId, $onHandshakeResult ) : Generator
$clientId integer
return Generator
    private function tryAppOnOpen(int $clientId, $onHandshakeResult) : \Generator
    {
        try {
            $onOpenResult = $this->application->onOpen($clientId, $onHandshakeResult);
            if ($onOpenResult instanceof \Generator) {
                $onOpenResult = (yield from $onOpenResult);
            }
        } catch (\Throwable $e) {
            yield from $this->onAppError($clientId, $e);
        }
    }