SocketIOUnity icon indicating copy to clipboard operation
SocketIOUnity copied to clipboard

WSS support

Open popkingcorn opened this issue 2 years ago • 1 comments

Does this library supports wss? With WS all works great, but with wss i can't connect to server.

popkingcorn avatar Mar 21 '23 10:03 popkingcorn

you can set the Transport propoerty to SocketIOClient.Transport.TransportProtocol.WebSocket

var uri = new Uri("https://www.example.com");
socket = new SocketIOUnity(uri, new SocketIOOptions
{
    Query = new Dictionary<string, string>
        {
            {"token", "UNITY" }
        }
    ,
    Transport = SocketIOClient.Transport.TransportProtocol.WebSocket
});

otherwise check with the original repo https://github.com/doghappy/socket.io-client-csharp

itisnajim avatar Mar 21 '23 12:03 itisnajim