Since Alpha1, socket's life cycle's beginning and end have corresponded to open and close event respectively. Now that socket's life cycle is extended, we need a special event to define the beginning of new life cycle and the end of old life cycle and it is the new event. In other words, the period between new events is the complete life cycle of socket. It is called when the server issues a new id shortly before open event and takes no arguments.
Along with this concept, it is no longer an error but an event to send an event where there is no connection. The cache event is the very event to deal with such situation. It is called when an event is sent when there is no connection and takes an array of event name, event data, resolved callback and rejected callback.
With these events, a user can accumulate events which couldn't be sent during disconnection to a queue on cache event and send them again on next open event and manage resources including that cache sharing the same life cycle with socket on new event. For the overall context of this feature, see cettia/cettia-protocol#1.
Since Alpha1, socket's life cycle's beginning and end have corresponded to
openandcloseevent respectively. Now that socket's life cycle is extended, we need a special event to define the beginning of new life cycle and the end of old life cycle and it is thenewevent. In other words, the period betweennewevents is the complete life cycle of socket. It is called when the server issues a new id shortly beforeopenevent and takes no arguments.Along with this concept, it is no longer an error but an event to send an event where there is no connection. The
cacheevent is the very event to deal with such situation. It is called when an event is sent when there is no connection and takes an array of event name, event data, resolved callback and rejected callback.With these events, a user can accumulate events which couldn't be sent during disconnection to a queue on
cacheevent and send them again on nextopenevent and manage resources including that cache sharing the same life cycle with socket onnewevent. For the overall context of this feature, see cettia/cettia-protocol#1.