public interface Protocol<T>
Protocol接口,
使用时将该实现类注册至服务启动类AioQuickClient/AioQuickServer
注意:框架本身的所有Socket链路复用同一个Protocol,
请勿在其实现类的成员变量中存储特定链路的数据。| Modifier and Type | Method and Description |
|---|---|
T |
decode(ByteBuffer readBuffer,
AioSession<T> session)
对于从Socket流中获取到的数据采用当前Protocol的实现类协议进行解析。
|
T decode(ByteBuffer readBuffer, AioSession<T> session)
readBuffer - 待处理的读buffersession - 本次需要解码的sessionCopyright © 2019. All rights reserved.