public class MqttWebServerAioHandler extends Object implements org.tio.server.intf.ServerAioHandler
| 构造器和说明 |
|---|
MqttWebServerAioHandler(org.tio.http.common.HttpConfig httpConfig,
org.tio.http.common.handler.HttpRequestHandler requestHandler,
org.tio.websocket.server.handler.IWsMsgHandler wsMsgHandler) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.tio.core.intf.Packet |
decode(ByteBuffer buffer,
int limit,
int position,
int readableLength,
org.tio.core.ChannelContext context) |
ByteBuffer |
encode(org.tio.core.intf.Packet packet,
org.tio.core.TioConfig tioConfig,
org.tio.core.ChannelContext channelContext) |
void |
handler(org.tio.core.intf.Packet packet,
org.tio.core.ChannelContext channelContext) |
org.tio.http.common.HttpResponse |
updateWebSocketProtocol(org.tio.http.common.HttpRequest request)
本方法改编自baseio: https://gitee.com/generallycloud/baseio
感谢开源作者的付出 |
public MqttWebServerAioHandler(org.tio.http.common.HttpConfig httpConfig,
org.tio.http.common.handler.HttpRequestHandler requestHandler,
org.tio.websocket.server.handler.IWsMsgHandler wsMsgHandler)
public org.tio.core.intf.Packet decode(ByteBuffer buffer, int limit, int position, int readableLength, org.tio.core.ChannelContext context) throws org.tio.core.exception.TioDecodeException
decode 在接口中 org.tio.core.intf.AioHandlerorg.tio.core.exception.TioDecodeExceptionpublic ByteBuffer encode(org.tio.core.intf.Packet packet, org.tio.core.TioConfig tioConfig, org.tio.core.ChannelContext channelContext)
encode 在接口中 org.tio.core.intf.AioHandlerpublic void handler(org.tio.core.intf.Packet packet,
org.tio.core.ChannelContext channelContext)
throws Exception
handler 在接口中 org.tio.core.intf.AioHandlerExceptionpublic org.tio.http.common.HttpResponse updateWebSocketProtocol(org.tio.http.common.HttpRequest request)
throws org.tio.core.exception.TioDecodeException
request - HttpRequestorg.tio.core.exception.TioDecodeException - TioDecodeExceptionCopyright © 2022. All rights reserved.