| 程序包 | 说明 |
|---|---|
| org.smartboot.socket |
定义用户进行通信开发所需实现的接口。
|
| org.smartboot.socket.transport |
提供AIO通信服务的具体实现。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
NetMonitor.afterRead(AioSession session,
int readSize)
监控触发本次读回调Session的已读数据字节数
|
void |
NetMonitor.afterWrite(AioSession session,
int writeSize)
监控触发本次写回调session的已写数据字节数
|
void |
NetMonitor.beforeRead(AioSession session)
即将开始读取数据
|
void |
NetMonitor.beforeWrite(AioSession session)
即将开始写数据
|
T |
Protocol.decode(ByteBuffer readBuffer,
AioSession session)
对于从Socket流中获取到的数据采用当前Protocol的实现类协议进行解析。
|
void |
MessageProcessor.process(AioSession session,
T msg)
处理接收到的消息
|
default void |
MessageProcessor.stateEvent(AioSession session,
StateMachineEnum stateMachineEnum,
Throwable throwable)
状态机事件,当枚举事件发生时由框架触发该方法
|
| 限定符和类型 | 方法和说明 |
|---|---|
AioSession |
AioQuickClient.start()
启动客户端。
|
AioSession |
AioQuickClient.start(AsynchronousChannelGroup asynchronousChannelGroup)
启动客户端。
|
| 限定符和类型 | 方法和说明 |
|---|---|
<A> void |
AioQuickClient.start(A attachment,
CompletionHandler<AioSession,? super A> handler)
采用异步的方式启动客户端
|
<A> void |
AioQuickClient.start(AsynchronousChannelGroup asynchronousChannelGroup,
A attachment,
CompletionHandler<AioSession,? super A> handler)
采用异步的方式启动客户端
|
Copyright © 2023. All rights reserved.