| Modifier and Type | Method and Description |
|---|---|
Packet |
TioClientHandler.heartbeatPacket(ChannelContext context)
创建心跳包
|
| Modifier and Type | Field and Description |
|---|---|
ConcurrentMap<Integer,Packet> |
TioConfig.waitingResps |
| Modifier and Type | Method and Description |
|---|---|
Packet |
PacketConverter.convert(Packet packet,
ChannelContext context) |
| Modifier and Type | Method and Description |
|---|---|
Map<Integer,Packet> |
TioConfig.getWaitingResps() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
Tio.bSend(ChannelContext channelContext,
Packet packet)
阻塞发送消息到指定ChannelContext
|
boolean |
ChannelContext.bSend(Packet packet)
发送消息
|
static boolean |
Tio.bSend(TioConfig tioConfig,
String ip,
int port,
Packet packet)
发送到指定的ip和port
|
static boolean |
Tio.bSendToAll(TioConfig tioConfig,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到所有连接
|
static boolean |
Tio.bSendToBsId(TioConfig tioConfig,
String bsId,
Packet packet)
阻塞发消息给指定业务ID
|
static boolean |
Tio.bSendToGroup(TioConfig tioConfig,
String group,
Packet packet)
发消息到组
|
static boolean |
Tio.bSendToGroup(TioConfig tioConfig,
String group,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到组
|
static boolean |
Tio.bSendToId(TioConfig tioConfig,
String channelContextId,
Packet packet)
发消息给指定ChannelContext id
|
static boolean |
Tio.bSendToSet(TioConfig tioConfig,
Set<ChannelContext> set,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到指定集合
|
static boolean |
Tio.bSendToToken(TioConfig tioConfig,
String token,
Packet packet)
阻塞发消息到指定token
|
static boolean |
Tio.bSendToUser(TioConfig tioConfig,
String userid,
Packet packet)
阻塞发消息给指定用户
|
Packet |
PacketConverter.convert(Packet packet,
ChannelContext context) |
void |
WriteCompletionHandler.handleOne(Integer result,
Throwable throwable,
Packet packet,
boolean isSentSuccess) |
void |
ChannelContext.processAfterSent(Packet packet,
boolean isSentSuccess) |
static boolean |
Tio.send(ChannelContext channelContext,
Packet packet)
发送消息到指定ChannelContext
|
boolean |
ChannelContext.send(Packet packet)
发送消息
|
static boolean |
Tio.send(TioConfig tioConfig,
String ip,
int port,
Packet packet)
发送到指定的ip和port
|
static void |
Tio.sendToAll(TioConfig tioConfig,
Packet packet)
发消息到所有连接
|
static void |
Tio.sendToAll(TioConfig tioConfig,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到所有连接
|
static boolean |
Tio.sendToBsId(TioConfig tioConfig,
String bsId,
Packet packet)
发消息给指定业务ID
|
static void |
Tio.sendToGroup(TioConfig tioConfig,
String group,
Packet packet)
发消息到组
|
static void |
Tio.sendToGroup(TioConfig tioConfig,
String group,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到组
|
static boolean |
Tio.sendToId(TioConfig tioConfig,
String channelContextId,
Packet packet)
发消息给指定ChannelContext id
|
static void |
Tio.sendToSet(TioConfig tioConfig,
Set<ChannelContext> set,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到指定集合
|
static boolean |
Tio.sendToToken(TioConfig tioConfig,
String token,
Packet packet)
发消息到指定token
|
static boolean |
Tio.sendToUser(TioConfig tioConfig,
String userid,
Packet packet)
发消息给指定用户
|
| Modifier and Type | Class and Description |
|---|---|
class |
EncodedPacket |
class |
IgnorePacket
空包,不需要业务处理
|
| Modifier and Type | Method and Description |
|---|---|
Packet |
TioHandler.decode(ByteBuffer buffer,
int limit,
int position,
int readableLength,
ChannelContext context)
根据ByteBuffer解码成业务需要的Packet对象.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
TioHandler.encode(Packet packet,
TioConfig tioConfig,
ChannelContext context)
编码
|
void |
TioHandler.handler(Packet packet,
ChannelContext context)
处理消息包
|
default void |
TioListener.onAfterDecoded(ChannelContext context,
Packet packet,
int packetSize)
原方法名:onAfterDecoded
解码成功后触发本方法
|
default void |
TioListener.onAfterHandled(ChannelContext context,
Packet packet,
long cost)
处理一个消息包后
|
default void |
TioListener.onAfterSent(ChannelContext context,
Packet packet,
boolean isSentSuccess)
消息包发送之后触发本方法
|
void |
PacketListener.onAfterSent(ChannelContext context,
Packet packet,
boolean isSentSuccess) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
SslUtils.needSslEncrypt(Packet packet,
TioConfig tioConfig)
是否需要对这个packet进行SSL加密
|
| Modifier and Type | Method and Description |
|---|---|
Queue<Packet> |
SendRunnable.getForSendAfterSslHandshakeCompleted(boolean forceCreate) |
Queue<Packet> |
SendRunnable.getMsgQueue() |
Queue<Packet> |
HandlerRunnable.getMsgQueue() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
SendRunnable.addMsg(Packet packet) |
void |
HandlerRunnable.handler(Packet packet)
处理packet
|
void |
DecodeRunnable.handler(Packet packet,
int byteCount)
消息处理
|
boolean |
SendRunnable.sendPacket(Packet packet) |
| Constructor and Description |
|---|
SendRunnable(ChannelContext channelContext,
Executor executor,
Queue<Packet> msgQueue) |
| Modifier and Type | Method and Description |
|---|---|
Packet |
ClusterMessageDecoder.decode(ChannelContext ctx,
ByteBuffer buffer,
int readableLength) |
| Modifier and Type | Method and Description |
|---|---|
Packet |
ClusterTcpServerHandler.decode(ByteBuffer buffer,
int limit,
int position,
int readableLength,
ChannelContext context) |
Packet |
ClusterTcpClientHandler.decode(ByteBuffer buffer,
int limit,
int position,
int readableLength,
ChannelContext context) |
Packet |
ClusterTcpClientHandler.heartbeatPacket(ChannelContext context) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
ClusterTcpServerHandler.encode(Packet packet,
TioConfig tioConfig,
ChannelContext context) |
ByteBuffer |
ClusterTcpClientHandler.encode(Packet packet,
TioConfig tioConfig,
ChannelContext context) |
void |
ClusterTcpServerHandler.handler(Packet packet,
ChannelContext context) |
void |
ClusterTcpClientHandler.handler(Packet packet,
ChannelContext context) |
| Modifier and Type | Class and Description |
|---|---|
class |
AbsClusterMessage
集群消息类型
|
class |
ClusterDataMessage
集群 data 消息
|
class |
ClusterFailedMessage
检测到失败的消息
|
class |
ClusterJoinMessage
节点加入集群
|
class |
ClusterPingMessage
集群 ping 消息
|
class |
ClusterPongMessage
集群 pong 消息
|
class |
ClusterReconnectMessage
重连消息
|
class |
ClusterSyncAckMessage
同步消息回复
|
class |
ClusterSyncMessage
同步消息
|
| Modifier and Type | Method and Description |
|---|---|
Packet |
DecoderFunction.apply(ChannelContext context,
ByteBuffer buffer,
int readableLength)
解码函数
|
| Modifier and Type | Method and Description |
|---|---|
static Packet |
ProxyProtocolDecoder.decode(ChannelContext context,
ByteBuffer buffer,
int readableLength,
DecoderFunction next)
解码 proxy protocol
|
static Packet |
ProxyProtocolDecoder.decodeIfEnable(ChannelContext context,
ByteBuffer buffer,
int readableLength,
DecoderFunction next)
解码,如果开启了 proxy protocol
|
Copyright © 2025. All rights reserved.