public class TcpHandshakeProcessor extends Object implements HandshakeProcessorIntf
| Constructor and Description |
|---|
TcpHandshakeProcessor() |
| Modifier and Type | Method and Description |
|---|---|
ImPacket |
handshake(ImPacket packet,
org.tio.core.ChannelContext channelContext)
对httpResponsePacket参数进行补充并返回,如果返回null表示不想和对方建立连接,框架会断开连接,如果返回非null,框架会把这个对象发送给对方
|
boolean |
isProtocol(org.tio.core.ChannelContext channelContext)
不同协议判断方法
|
String |
name()
该proCmd处理器名称(自定义)
|
void |
onAfterHandshaked(ImPacket packet,
org.tio.core.ChannelContext channelContext)
握手成功后
|
public ImPacket handshake(ImPacket packet, org.tio.core.ChannelContext channelContext) throws Exception
HandshakeProcessorIntfhandshake in interface HandshakeProcessorIntfExceptionpublic void onAfterHandshaked(ImPacket packet, org.tio.core.ChannelContext channelContext) throws Exception
onAfterHandshaked in interface HandshakeProcessorIntfpacket - channelContext - Exceptionpublic boolean isProtocol(org.tio.core.ChannelContext channelContext)
ProcessorIntfisProtocol in interface ProcessorIntfpublic String name()
ProcessorIntfname in interface ProcessorIntfCopyright © 2018. All rights reserved.