Members
connected :boolean
true when the web-socket between the client and the ReactiveDb service is successfully established.
Type:
- boolean
connecting :boolean
true if the web-socket between the client and the ReactiveDb service is currently being established (typically
when invoking the ReactiveDb#connect method).
Type:
- boolean
online :boolean
true if the network interface of the client is up, or false if the network connectivity is down.
Type:
- boolean
Methods
subscribe(listener) → {function}
Subscribes to connection state changes.
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
function | A callback that is invoked each time the connection state changes. It receives the new connection state as parameter. |
- Since:
- 3.11
Returns:
A void function (with no parameter) that may be invoked to unsubscribe the given listener.
- Type
- function