public interface ISocketService
WebSocket通道处理接口 在方法实现中,可随时调用 “WebSocketFactory”中的静态方法实现消息相关的操作。
Copyright(C) 2017-2020 上游科技
| 限定符和类型 | 方法和说明 |
|---|---|
void |
offline(Tokens token,
SocketClient client)
用户离线
|
void |
onError(Tokens token,
SocketClient client,
Throwable error)
发生错误
|
void |
online(Tokens token,
SocketClient client)
新用户上线
|
void |
onMessage(SocketClient fromClient,
SocketMsg msg)
新消息
|
void online(Tokens token, SocketClient client)
新用户上线
token - 通信令牌client - 客户端对象封装,其中含有会话sessionvoid offline(Tokens token, SocketClient client)
用户离线
token - 通信令牌client - 客户端对象封装,其中含有会话sessionvoid onMessage(SocketClient fromClient, SocketMsg msg)
新消息
msg - void onError(Tokens token, SocketClient client, Throwable error)
发生错误
client - error - Copyright © 2020. All rights reserved.