The Kuzzle object exposes a set of events triggered on some cases. To subscribe or unsubscribe on these events, simply plug a callback function to the event you want to listen, using the functions addListener and removeListener.
|Event Name||Callback arguments||Description|
|(none)||Triggered when the SDK has successfully connected to Kuzzle|
|Triggered when Kuzzle rejects a request (e.g. request can't be parsed, request too large, ...)|
|(none)||Triggered when the current session has been unexpectedly disconnected|
|Triggered when a login attempt completes, either with a success or a failure result|
|Triggered when the SDK has failed to connect to Kuzzle. Does not trigger offline mode.|
|Triggered whenever a request is removed from the offline queue.|
|Triggered whenever a request is added to the offline queue|
|Triggered whenever Kuzzle responds with an error|
|(none)||Triggered when the current session has reconnected to Kuzzle after a disconnection, and only if |
|(none)||Triggered when Kuzzle rejected a request because the authentication token expired|
Note: listeners are called in the order of their insertion.