Hi, I have the following code to connect to a websocket, which I know exists.
internal Socket()
{
using (var wss = new WebSocket("wss://<whatever>.com/socket.io/?EIO=4&transport=polling"))
{
wss.EnableRedirection = true;
wss.OnMessage += (sender, e) =>
Console.WriteLine("New message from controller: " + e.Data);
wss.Connect();
Console.ReadKey(true);
}
}
The response is the following from the socket if I try to follow the uri I'm using the new WebSocket(blabla): 0{"sid":"HzvIKK7jW8lETZjzADTU","upgrades":["websocket"],"pingTimeout":20000,"pingInterval":25000}
Yet I keep getting Not a WebSocket handshake response.??
How is it not a websocket handshake response?, I can connect just fine using Javascript with io.connect("whatever.com").
Why won't it work in CS?
Hi, I have the following code to connect to a websocket, which I know exists.
The response is the following from the socket if I try to follow the uri I'm using the
new WebSocket(blabla)
:0{"sid":"HzvIKK7jW8lETZjzADTU","upgrades":["websocket"],"pingTimeout":20000,"pingInterval":25000}
Yet I keep getting
Not a WebSocket handshake response.
??How is it not a websocket handshake response?, I can connect just fine using Javascript with io.connect("whatever.com"). Why won't it work in CS?
Thanks