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

Add an initialPacket option #471

Merged

Conversation

darrachequesne
Copy link
Member

@darrachequesne darrachequesne commented Jan 18, 2017

The kind of change this PR does introduce

  • a new feature

New behaviour

This PR adds a new option, initialMessage, which allow to provide a packet that will be concatenated with the handshake packet. That will allow to merge Engine.IO (sent here) and Socket.IO (sent here) handshakes, in order to reduce the number of roundtrips necessary to establish a connection.

Reviews are welcome! (and if you have a better name for the option...)

@darrachequesne
Copy link
Member Author

darrachequesne commented Jan 18, 2017

Question: Should it rather be an async callback? I was thinking to use it that way in Socket.IO:

initialMessage: '0' ('0' being the encoded form of the CONNECT packet, for the default namespace /)

@darrachequesne darrachequesne changed the title Add an additionalHandshakePacket option Add an initialMessage option Jan 19, 2017
@darrachequesne darrachequesne changed the title Add an initialMessage option Add an initialPacket option Jan 22, 2017
@darrachequesne darrachequesne merged commit 274efa1 into socketio:master Jan 22, 2017
@darrachequesne darrachequesne deleted the feature/handshake-optimisation branch January 22, 2017 06:51
@darrachequesne darrachequesne added this to the 2.0.0 milestone Jan 23, 2017
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

Successfully merging this pull request may close these issues.

1 participant