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

Implement open, delete, cache event #3

Closed
flowersinthesand opened this issue Jun 4, 2015 · 0 comments
Closed

Implement open, delete, cache event #3

flowersinthesand opened this issue Jun 4, 2015 · 0 comments
Assignees
Milestone

Comments

@flowersinthesand
Copy link
Member

The close event has been enough to handle socket's life cycle so far because a socket is closed only once in its life time but now that socket's life cycle is extended, a socket can be closed and opened many times and deleted from the server due to long-term disconnection. That's why we need more events to describe such events. Here's definitions of each event:

  • server's socket - It is called when a server receives a transport and a socket is newly created. It's the beginning of the life cycle. Unlike Alpha1 it can't exchange event here since the handshake is not performed yet.
  • open - It is called when the handshake is performed successfully and communication is possible. It can be called more than once like close.
  • close - It is called when the underlying transport is closed for any reason. It's the same with one of Alpha1 but can be called more than once like open.
  • delete - It is called when a socket is closed for a long time i.e. 1 minute and deleted from the server. It's the end of the life cycle.
  • cache - It is called when some event is sent while connection is disconnected where socket state is not opened. It takes an object array of event name, event data, resolved callback and rejected callback.

For the overall context of this feature, see cettia/cettia-protocol#1.

@flowersinthesand flowersinthesand added this to the 1.0.0-Alpha2 milestone Jun 4, 2015
@flowersinthesand flowersinthesand self-assigned this Feb 11, 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

No branches or pull requests

1 participant