接口 WebSocket
- 所有已知实现类:
AbstractWebSocket
public interface WebSocket
-
字段概要
字段 -
方法概要
修饰符和类型方法说明void
onDisconnect
(String channelId) 断开连接void
onHeartbeat
(io.netty.channel.Channel channel) 心跳包void
onHeartbeat
(String channelId) 断开连接void
onMessage
(WebSocketEntity webSocketEntity) 消息信息void
onSendMessage
(io.netty.channel.Channel channel, String message, String type) 发送消息void
onSendMessage
(String channelId, String message, String type) 发送消息
-
字段详细资料
-
方法详细资料
-
onMessage
消息信息- 参数:
webSocketEntity
- 消息内容
-
onDisconnect
断开连接- 参数:
channelId
- 通道ID
-
onHeartbeat
断开连接- 参数:
channelId
- 通道ID
-
onHeartbeat
void onHeartbeat(io.netty.channel.Channel channel) 心跳包- 参数:
channel
- 通道
-
onSendMessage
发送消息- 参数:
channel
- 通道message
- 消息内容type
- 数据类型
-
onSendMessage
发送消息- 参数:
channelId
- 通道IDmessage
- 消息内容type
- 数据类型
-