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

config.lobby.newMember invoked before config.clientEvents.begin? #91

Closed
gamecubate opened this issue Feb 17, 2016 · 5 comments
Closed

Comments

@gamecubate
Copy link

Looking at the sequence of server side events, it seems like lobby.newMember gets called before clientEvents.begin (newly connected user) does. This doesn't make sense to me but I'll work with it if that is indeed the way things are. Can you confirm? Thanks.

@incompl
Copy link
Owner

incompl commented Feb 17, 2016

Yup looks like it: https://github.com/incompl/cloak/blob/master/src/server/cloak/index.js#L133-L138

I could see the case for swapping those in a new version. What do you think, @jugglinmike?

@gamecubate
Copy link
Author

To clarify, this is obviously not a deal breaker but I was thrown off by the fact that one could be seen as entering a room (newMember) before one had established a first handshake with the server (begin). Hence my post. I could do a PR if you want.

@vstirbu
Copy link
Contributor

vstirbu commented Feb 22, 2016

The begin, disconnect and resumeclient events are related to the connectivity layer (e.g. web sockets), while the newMember is an application level concept (e.g room/lobby).

Maybe the documentation needs to be updated to make the distinction clearer.

@incompl
Copy link
Owner

incompl commented Feb 22, 2016

@gamecubate I'd be happy to look at a PR for that!

@gamecubate
Copy link
Author

Well, judging from @vstirbu's answer, this seems normal. I wouldn't want to rock the boat for so trivial a matter. Will close issue for now.

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

3 participants