theturtle32/AS3WebSocket

Connecting to latest socketIO server works, but I get disconnected immediately

Closed this issue · 1 comments

I get a connected message when connecting to a socketIO server but then an immediate disconnect.
Any suggestions? This is my complete message

Connecting to 192.168.4.134 on port 3000
Socket Connected
GET / HTTP/1.1
Host: 192.168.4.134:3000
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: ZnyGKnse5Tsdr6znXQKGSA==
Origin: *
Sec-WebSocket-Version: 13
Sec-WebSocket-Protocol: lws-mirror-protocol

Socket Disconnected
Websocket closed.

WebSockets and Socket.IO are not the same thing. Socket.IO uses WebSockets as one possible transport medium, but also defines its own protocols on top. While AS3WebSocket could be used as the WebSocket portion of a full Socket.IO client, you will have to implement the rest of the Socket.IO protocol also.

If you just want to connect flash to a server using WebSockets, skip Socket.IO and just use a plain WebSocket library, such as my WebSocket-Node library, instead.

Brian

Sent from my iPhone

On Feb 20, 2015, at 1:22 PM, jBachalo notifications@github.com wrote:

I get a connected message when connecting to a socketIO server but then an immediate disconnect.
Any suggestions? This is my complete message

Connecting to 192.168.4.134 on port 3000
Socket Connected
GET / HTTP/1.1
Host: 192.168.4.134:3000
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: ZnyGKnse5Tsdr6znXQKGSA==
Origin: *
Sec-WebSocket-Version: 13
Sec-WebSocket-Protocol: lws-mirror-protocol

Socket Disconnected
Websocket closed.

Reply to this email directly or view it on GitHub.