public interface ProtocolHandler extends Ordered
COMPARATOR| 限定符和类型 | 方法和说明 |
|---|---|
void |
addPipeline(io.netty.channel.Channel channel,
io.netty.buffer.ByteBuf clientFirstMsg)
add protocol pipeline support
|
boolean |
canSupport(io.netty.buffer.ByteBuf clientFirstMsg)
Support protocol
|
default boolean |
canSupport(io.netty.channel.Channel channel)
Support protocol. if receive clientFirstMsg timeout, then call canSupport(channel)
|
default int |
getOrder()
default Priority order 0
|
default String |
getProtocolName()
Get the protocol name
|
default boolean |
onOutOfMaxConnection(io.netty.buffer.ByteBuf clientFirstMsg,
TcpChannel tcpChannel,
int currentConnections,
int maxConnections)
on out of max connection count
|
default String getProtocolName()
boolean canSupport(io.netty.buffer.ByteBuf clientFirstMsg)
clientFirstMsg - client first messagedefault boolean canSupport(io.netty.channel.Channel channel)
channel - channeldefault boolean onOutOfMaxConnection(io.netty.buffer.ByteBuf clientFirstMsg,
TcpChannel tcpChannel,
int currentConnections,
int maxConnections)
clientFirstMsg - clientFirstMsgtcpChannel - tcpChannelcurrentConnections - currentConnectionsmaxConnections - maxConnectionsvoid addPipeline(io.netty.channel.Channel channel,
io.netty.buffer.ByteBuf clientFirstMsg)
throws Exception
channel - TCP channelclientFirstMsg - clientFirstMsgException - ExceptionCopyright © 2023. All rights reserved.