1
socket.connectionStatus().subscribe((status) => console.log("Connection status changed: ", status));

结果是:

Connection status changed: Object { kind: "CONNECTED" }
Connection status changed: Object { kind: "CONNECTED" }

国家的文件connectionStatus()

返回一个 Flowable,它立即发布当前连接 * 状态,然后随着它的变化而更新。[...]

4

0 回答 0