Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further explain the protocol (pieces are missing) #12

Closed
marcofranssen opened this issue Nov 27, 2014 · 4 comments
Closed

Further explain the protocol (pieces are missing) #12

marcofranssen opened this issue Nov 27, 2014 · 4 comments

Comments

@marcofranssen
Copy link

The protocol is not very clear on how it exactly works.
As Example this issue. socketio/socket.io#1894

Nowhere is described that upgrading the connection needs a 5 to be sent over the websocket to complete it before other messages are sent.

connecting to a namespace requires a 40.

However that number is not explained over here.

4 means error
0 means connect

@daid
Copy link

daid commented Jan 29, 2015

Actually, I think this document is an insult to actual protocol descriptions. As it reads like some odd document which cannot decide if it's a protocol description or an API documentation.

@Grant1219
Copy link

Yea I agree with daid... your best bet is probably installing the node.js server and the example programs, then using tcpdump or another sniffer to analyze the protocol. That's what I'm trying to do at the moment anyway.

@thetrompf
Copy link

The 4 comes from the engine.io-protocol, so when looking at the raw data send over the wire, it goes through two "protocols" the raw transportation layer (engine.io-protocol) and then the specific transport layer, in this case socket.io-protocol, so 40 means 4 (message from the engine.io-protocol) and 0 which means connect, and then the rest is the /nsp part.

So we tell the abstract transport layer (engine-io) that here comes a message, and the message type in socket.io-protocol is connect which means that you are connecting to a namespace.

@rauchg
Copy link
Contributor

rauchg commented Nov 30, 2015

I'm closing this in favor of #14, let's continue the discussion there.

@rauchg rauchg closed this as completed Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants