I've been working on this for past 10 days. My task is this: to connect from Unity3D to SocketIO server that is using namespaces. The problem is that there isn't any usable SocketIO library for C# (without changing anything on server). So I'm forced to used regular WebSockets. I have found couple of libraries (currently using WebSocketSharp). I have managed to connect to regular SocketIO server but I need to find a way to connect to SocketIO that is using namespaces.
First I'm sending a http GET request to SocketIO server to get the handshake. Like this:
...new WebRequest("http://somewebsite.com:8080/socket.io/1/?t=" + time, "GET");
I got the "time" variable from function that is the same as JavaScript's getTime() function. After this I'm trying to connect to WebSocket like this:
...new WebSocket("ws://somewebsite.com:8080/socket.io/1/websocket/" + key[0]);
key[0] variable is just the response from the web request.
This all works when the arhitecture on SocketIO server side is regular, but how to implement all this with SocketIO server that is using namespaces?
I have inspected the Chrome's network traffic and only place where namespace is mentioned is under the Frames tab (on second request when the web socket is trying to connect).
Thank you.
EDIT: version of the SocketIO on server is 0.9.x