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

Allow for custom callback data to Client.connect() #19

Closed
kpdecker opened this issue Sep 5, 2015 · 4 comments
Closed

Allow for custom callback data to Client.connect() #19

kpdecker opened this issue Sep 5, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@kpdecker
Copy link
Contributor

@kpdecker kpdecker commented Sep 5, 2015

It would be nice to allow for the server to push init data to the client on connection, ex:

client.connect(function(err, data) {
  myState.clientId = data.clientId;
});

Not sure if this is possible through current hello implementation, but filing to track the feature.

@kpdecker

This comment has been minimized.

Copy link
Contributor Author

@kpdecker kpdecker commented Sep 5, 2015

This can be done by the client sending an 'init' or similar sort of request immediately after connect, so this would just be an optimization to allow that step to be omitted from the channel.

@hueniverse

This comment has been minimized.

Copy link
Member

@hueniverse hueniverse commented Sep 6, 2015

Should this happen on each reconnect?

@hueniverse hueniverse added the request label Sep 6, 2015
@hueniverse hueniverse changed the title Allow for custom callback data to Client.connect Allow for custom callback data to Client.connect() Sep 6, 2015
@kpdecker

This comment has been minimized.

Copy link
Contributor Author

@kpdecker kpdecker commented Sep 6, 2015

I think it should but perhaps we should have a flag so both the client and the server are aware of this case and can alter their behaviors if relevant.

@hueniverse hueniverse self-assigned this Sep 14, 2015
@hueniverse

This comment has been minimized.

Copy link
Member

@hueniverse hueniverse commented Sep 14, 2015

Instead of this, server can now send a message inside onConnection using socket.send()

@hueniverse hueniverse added this to the 1.0.0 milestone Sep 14, 2015
@Marsup Marsup added feature and removed request labels Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.