public class SocketServiceDef extends Object implements ISocketService
默认通道处理(DefaultChannel)
Copyright(C) 2017-2020 上游科技
| 构造器和说明 |
|---|
SocketServiceDef() |
| 限定符和类型 | 方法和说明 |
|---|---|
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)
新消息
|
public void online(Tokens token, SocketClient client)
ISocketService新用户上线
online 在接口中 ISocketServicetoken - 通信令牌client - 客户端对象封装,其中含有会话sessionpublic void offline(Tokens token, SocketClient client)
ISocketService用户离线
offline 在接口中 ISocketServicetoken - 通信令牌client - 客户端对象封装,其中含有会话sessionpublic void onMessage(SocketClient fromClient, SocketMsg msg)
ISocketService新消息
onMessage 在接口中 ISocketServicepublic void onError(Tokens token, SocketClient client, Throwable error)
ISocketService发生错误
onError 在接口中 ISocketServiceCopyright © 2020. All rights reserved.