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 · 5 comments
Closed

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

kpdecker opened this issue Sep 5, 2015 · 5 comments
Assignees
Labels
feature New functionality or improvement
Milestone

Comments

@kpdecker
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

Should this happen on each reconnect?

@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
Copy link
Contributor Author

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
Copy link
Contributor

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 New functionality or improvement and removed request labels Sep 20, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

3 participants