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
HandshakeProcessorIntf
handshake
in interface HandshakeProcessorIntf
Exception
public void onAfterHandshaked(ImPacket packet, org.tio.core.ChannelContext channelContext) throws Exception
onAfterHandshaked
in interface HandshakeProcessorIntf
packet
- channelContext
- Exception
public boolean isProtocol(org.tio.core.ChannelContext channelContext)
ProcessorIntf
isProtocol
in interface ProcessorIntf
public String name()
ProcessorIntf
name
in interface ProcessorIntf
Copyright © 2018. All rights reserved.