You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: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 likeclose
.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 likeopen
.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.
The text was updated successfully, but these errors were encountered: