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

Change when connection connect events/methods are raised #2997

DamianEdwards opened this Issue Apr 15, 2014 · 1 comment


None yet
3 participants

DamianEdwards commented Apr 15, 2014

Change the client/server connect event lifetime to the following:

  1. Client calls start and promise is returned. Move the connection state to "connecting".
  2. Client sends negotiate request to server.
  3. Server replies with negotiate response.
  4. Client sends connect request for a transport, e.g. WebSockets.
  5. Server initiates the transport, subscribes to signals, and sends the init message.
  6. If transport connects successfully and init message is received before time-out, continue. Otherwise, move on to next transport in fallback list. Connect with a fallback flag set if not initial transport.
  7. Client receives the init message from server and then sends an Ajax connect message to the server and waits for connect response.
  8. Server receives connect message and calls/raises OnConnected, once OnConnected completes server sends connect response to client.
  9. If the client doesn't receive a response to the connect message before a time-out, fail the start promise and move the connection state to "disconnected".
  10. If the client does receive a response to the connect message before a time-out, resolve the start promise and moves connection state to "connected".

@DamianEdwards DamianEdwards added this to the 2.1.0 Beta milestone Apr 15, 2014

@halter73 halter73 added 3 - Working and removed 1 - Ready labels Apr 17, 2014


This comment has been minimized.


abnanda1 commented Apr 28, 2014

What kind of scenarios will this system of '2 connect messages' prevent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment