Package | Description |
---|---|
org.tio.websocket.common | |
org.tio.websocket.server | |
org.tio.websocket.server.handler |
Modifier and Type | Method and Description |
---|---|
static WsRequest |
WsServerDecoder.decode(ByteBuffer buf,
ChannelContext channelContext) |
static WsRequest |
WsRequest.fromBytes(byte[] bytes) |
static WsRequest |
WsRequest.fromText(String text,
String charset) |
Modifier and Type | Method and Description |
---|---|
WsRequest |
WsServerAioHandler.decode(ByteBuffer buffer,
int limit,
int position,
int readableLength,
ChannelContext channelContext) |
Modifier and Type | Method and Description |
---|---|
Object |
IWsMsgHandler.onBytes(WsRequest wsRequest,
byte[] bytes,
ChannelContext channelContext)
当收到Opcode.BINARY消息时,执行该方法。也就是说如何你的ws是基于BINARY传输的,就会走到这个方法
|
Object |
IWsMsgHandler.onClose(WsRequest wsRequest,
byte[] bytes,
ChannelContext channelContext)
当收到Opcode.CLOSE时,执行该方法,业务层在该方法中一般不需要写什么逻辑,空着就好
|
Object |
IWsMsgHandler.onText(WsRequest wsRequest,
String text,
ChannelContext channelContext)
当收到Opcode.TEXT消息时,执行该方法。也就是说如何你的ws是基于TEXT传输的,就会走到这个方法
|
Copyright © 2021. All rights reserved.