WSS problems
`
use Ratchet\Http\HttpServer;
use Ratchet\Server\IoServer;
use Ratchet\WebSocket\WsServer;
use React\EventLoop\Loop;
use React\Socket\SocketServer;
use React\Socket\SecureServer;

        $ip = '0.0.0.0';
        $port = '1234';
        $loop = Loop::get();

        $socket = new SocketServer("{$ip}:{$port}", [], $loop);

        $secureSocket = new SecureServer($socket, $loop, [
            'local_cert' => '/home/www/cert/cert.pem',
            'local_pk' => '/home/www/cert/key.pem', 
            'allow_self_signed' => true, 
            'verify_peer' => true, 
        ]);

        $server = new IoServer(
            new HttpServer(
                new WsServer(
                    new ChatServer()
                )
            ),
            $secureSocket,
            $loop
        );

        echo "Secure socket server run on wss://{$ip}:{$port}\n";
        $server->run();
`

I'm trying to establish a WSS connection. The certificates are signed and validated, but the connection always fails with a "handshake failure" error. Maybe I'm using the React library classes incorrectly, or I'm missing some parameter?