socket.connectionStatus().subscribe((status) => console.log("Connection status changed: ", status));
results in:
Connection status changed: Object { kind: "CONNECTED" }
Connection status changed: Object { kind: "CONNECTED" }
The documentation of connectionStatus()
states:
Returns a Flowable that immediately publishes the current connection * status and thereafter updates as it changes. [...]