public class AimReceiver extends Object implements AimReceive
| 限定符和类型 | 字段和说明 |
|---|---|
protected SessionGroups |
groups
所有群组
|
protected io.netty.util.internal.logging.InternalLogger |
logger
日志对象
|
protected Sessions |
sessions
所有会话
|
| 构造器和说明 |
|---|
AimReceiver() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onByte(io.netty.channel.Channel ch,
io.netty.buffer.ByteBuf in)
处理WebSocket binary请求
测试方法,正式业务请重写
|
void |
onClose(io.netty.channel.Channel ch,
ChannelClose close)
关闭连接通道
|
boolean |
onHandShake(io.netty.channel.Channel ch,
io.netty.buffer.ByteBuf in)
Socks基于自定义Bing握手处理逻辑,绑定用户信息到会话系统
|
boolean |
onHandShake(io.netty.channel.Channel ch,
io.netty.handler.codec.http.FullHttpRequest req,
io.netty.handler.codec.http.FullHttpResponse res)
WebSocket握手处理逻辑,绑定用户信息到会话系统
|
boolean |
onHandShake(io.netty.channel.Channel ch,
String user,
String token)
Socks基于ProtoBuf-Login的握手处理逻辑
|
void |
onHandShaked(io.netty.channel.Channel ch)
握手成功业务处理类,此方法支持Async异步处理
|
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 s)
测试方法,正式业务请重写
|
void |
onText(io.netty.channel.Channel ch,
String text)
Text类型数据处理,测试用,正式业务请重写
|
@Autowired protected Sessions sessions
@Autowired protected SessionGroups groups
protected 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 boolean onHandShake(io.netty.channel.Channel ch,
String user,
String token)
onHandShake 在接口中 SocksHandShakech - user - token - public void onHandShaked(io.netty.channel.Channel ch)
AimReceiveonHandShaked 在接口中 AimReceivepublic void onPing(io.netty.channel.Channel ch)
AimReceiveonPing 在接口中 AimReceivepublic void onText(io.netty.channel.Channel ch,
String text)
onText 在接口中 AimReceivech - text - public void onByte(io.netty.channel.Channel ch,
io.netty.buffer.ByteBuf in)
onByte 在接口中 AimReceivech - in - com.google.protobuf.InvalidProtocolBufferExceptionpublic void onRecive(io.netty.channel.Channel ch,
Sent s)
onRecive 在接口中 AimReceivech - s - public Reply onKick(io.netty.channel.Channel ch, Session session)
AimReceiveonKick 在接口中 AimReceivepublic void onClose(io.netty.channel.Channel ch,
ChannelClose close)
AimReceiveonClose 在接口中 AimReceiveCopyright © 2020–2022 The AIM Project. All rights reserved.