小智 8
斯威夫特 4:
let socketConnectionStatus = socket.status
switch socketConnectionStatus {
case SocketIOStatus.connected:
print("socket connected")
case SocketIOStatus.connecting:
print("socket connecting")
case SocketIOStatus.disconnected:
print("socket disconnected")
case SocketIOStatus.notConnected:
print("socket not connected")
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4380 次 |
| 最近记录: |