类 AioReceiver

    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected SessionGroups groups
      所有群组
      protected io.netty.util.internal.logging.InternalLogger logger
      日志对象
      protected Sessions sessions
      所有会话
    • 构造器概要

      构造器 
      构造器 说明
      AioReceiver()  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void onByte​(io.netty.channel.Channel ch, io.netty.buffer.ByteBuf in)
      处理WebSocket binary请求 测试方法,正式业务请重写
      void onClose​(io.netty.channel.Channel ch, AioClose 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 token)
      Socks基于ProtoBuf-Login的握手处理逻辑
      void onHandShaked​(io.netty.channel.Channel ch)
      握手成功业务处理类,此方法支持Async异步处理
      Events onKick​(io.netty.channel.Channel old, Session session)
      处理互踢旧连接关闭业务逻辑
      void onPing​(io.netty.channel.Channel ch)
      收到客户端的Ping操作
      void onRecive​(io.netty.channel.Channel ch, Events s)
      测试方法,正式业务请重写
      void onText​(io.netty.channel.Channel ch, String text)
      Text类型数据处理,测试用,正式业务请重写
    • 字段详细资料

      • logger

        protected final io.netty.util.internal.logging.InternalLogger logger
        日志对象
      • sessions

        @Autowired
        protected Sessions sessions
        所有会话
    • 构造器详细资料

      • AioReceiver

        public AioReceiver()
    • 方法详细资料

      • onHandShake

        public boolean onHandShake​(io.netty.channel.Channel ch,
                                   io.netty.handler.codec.http.FullHttpRequest req,
                                   io.netty.handler.codec.http.FullHttpResponse res)
        WebSocket握手处理逻辑,绑定用户信息到会话系统
        指定者:
        onHandShake 在接口中 WebSocketHandShake
        参数:
        ch - 当前连接通道
        req - 当前上行请求,URL参数已经放入ch中
        res - 握手失败 return false 输出给客户端的对象
        返回:
      • onHandShake

        public boolean onHandShake​(io.netty.channel.Channel ch,
                                   io.netty.buffer.ByteBuf in)
        Socks基于自定义Bing握手处理逻辑,绑定用户信息到会话系统
        指定者:
        onHandShake 在接口中 SocksHandShake
        参数:
        ch - 通道
        in - 握手数据包
        返回:
      • onHandShake

        public boolean onHandShake​(io.netty.channel.Channel ch,
                                   String token)
        Socks基于ProtoBuf-Login的握手处理逻辑
        指定者:
        onHandShake 在接口中 SocksHandShake
        参数:
        ch -
        token -
        返回:
      • onHandShaked

        public void onHandShaked​(io.netty.channel.Channel ch)
        从接口复制的说明: AioReceive
        握手成功业务处理类,此方法支持Async异步处理
        指定者:
        onHandShaked 在接口中 AioReceive
      • onPing

        public void onPing​(io.netty.channel.Channel ch)
        从接口复制的说明: AioReceive
        收到客户端的Ping操作
        指定者:
        onPing 在接口中 AioReceive
      • onText

        public void onText​(io.netty.channel.Channel ch,
                           String text)
        Text类型数据处理,测试用,正式业务请重写
        指定者:
        onText 在接口中 AioReceive
        参数:
        ch -
        text -
      • onByte

        public void onByte​(io.netty.channel.Channel ch,
                           io.netty.buffer.ByteBuf in)
        处理WebSocket binary请求 测试方法,正式业务请重写
        指定者:
        onByte 在接口中 AioReceive
        参数:
        ch -
        in -
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • onRecive

        public void onRecive​(io.netty.channel.Channel ch,
                             Events s)
        测试方法,正式业务请重写
        指定者:
        onRecive 在接口中 AioReceive
        参数:
        ch -
        s -
      • onKick

        public Events onKick​(io.netty.channel.Channel old,
                             Session session)
        从接口复制的说明: AioReceive
        处理互踢旧连接关闭业务逻辑
        指定者:
        onKick 在接口中 AioReceive
      • onClose

        public void onClose​(io.netty.channel.Channel ch,
                            AioClose close)
        从接口复制的说明: AioReceive
        关闭连接通道
        指定者:
        onClose 在接口中 AioReceive