public class AimReceiver extends Object implements AimServerReceiver
| 限定符和类型 | 字段和说明 |
|---|---|
protected SessionGroups |
groups |
protected static io.netty.util.internal.logging.InternalLogger |
logger |
protected Sessions |
sessions |
| 构造器和说明 |
|---|
AimReceiver() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onByte(io.netty.channel.Channel ch,
io.netty.buffer.ByteBuf buf)
处理WebSocket binary请求
测试方法,正式业务请重写
|
void |
onClose(io.netty.channel.Channel ch,
ChannelClose heartbeat)
关闭连接通道
|
boolean |
onHandShake(io.netty.channel.Channel ch,
io.netty.buffer.ByteBuf in)
Socks握手处理逻辑,绑定用户信息到会话系统
|
boolean |
onHandShake(io.netty.channel.Channel ch,
io.netty.handler.codec.http.FullHttpRequest req,
io.netty.handler.codec.http.FullHttpResponse res)
WebSocket握手处理逻辑,绑定用户信息到会话系统
|
void |
onHandShaked(io.netty.channel.Channel ch) |
Reply |
onKick(io.netty.channel.Channel ch,
Session session)
处理互踢业务逻辑
|
void |
onPing(io.netty.channel.Channel ch)
收到客户端的Ping操作
|
void |
onRecive(io.netty.channel.Channel ch,
Sent msg)
测试方法,正式业务请重写
|
void |
onText(io.netty.channel.Channel ch,
String text)
Text类型数据处理,测试用,正式业务请重写
|
@Autowired protected Sessions sessions
@Autowired protected SessionGroups groups
protected static final io.netty.util.internal.logging.InternalLogger logger
public boolean onHandShake(io.netty.channel.Channel ch,
io.netty.handler.codec.http.FullHttpRequest req,
io.netty.handler.codec.http.FullHttpResponse res)
onHandShake 在接口中 WebSocketHandShakech - 当前连接通道req - 当前上行请求,URL参数已经放入ch中res - 握手失败 return false 输出给客户端的对象public boolean onHandShake(io.netty.channel.Channel ch,
io.netty.buffer.ByteBuf in)
onHandShake 在接口中 SocksHandShakech - 通道in - 握手数据包public void onHandShaked(io.netty.channel.Channel ch)
onHandShaked 在接口中 AimServerReceiverpublic void onPing(io.netty.channel.Channel ch)
AimServerReceiveronPing 在接口中 AimServerReceiverpublic void onText(io.netty.channel.Channel ch,
String text)
onText 在接口中 AimServerReceiverch - text - public void onByte(io.netty.channel.Channel ch,
io.netty.buffer.ByteBuf buf)
onByte 在接口中 AimServerReceiverch - buf - com.google.protobuf.InvalidProtocolBufferExceptionpublic void onRecive(io.netty.channel.Channel ch,
Sent msg)
onRecive 在接口中 AimServerReceiverch - msg - public Reply onKick(io.netty.channel.Channel ch, Session session)
AimServerReceiveronKick 在接口中 AimServerReceiverpublic void onClose(io.netty.channel.Channel ch,
ChannelClose heartbeat)
AimServerReceiveronClose 在接口中 AimServerReceiverCopyright © 2020–2022 The AIM Project. All rights reserved.