IoSession.State| 构造器和说明 |
|---|
AioSession(AioSocket socket)
构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
close()
关闭会话
|
protected MessageSplitter |
getMessagePartition()
获取消息分割处理类
|
boolean |
isConnected()
会话是否连接
|
boolean |
isOpen()
会话是否打开
|
int |
loaclPort()
获取本地端口
|
String |
localAddress()
获取本地 IP 地址
|
protected int |
read0(ByteBuffer buffer)
读取消息到缓冲区
|
String |
remoteAddress()
获取对端 IP 地址
|
int |
remotePort()
获取对端端口
|
void |
restart()
重连当前连接
|
protected int |
send0(ByteBuffer buffer)
发送消息
注意直接调用不会出发 onSent 事件
|
String |
toString() |
cancelIdle, checkIdle, containAttribute, enabledMessageSpliter, getAttribute, getAttributes, getByteBufferChannel, getHeartBeat, getIdleInterval, getMessageLoader, getSSLParser, getState, read, removeAttribute, send, setAttribute, setHeartBeat, setIdleInterval, setSSLParser, socketContext, syncRead, syncSend, waitpublic AioSession(AioSocket socket)
socket - AioSocket对象public String localAddress()
IoSessionlocalAddress 在类中 IoSession<AioSocket>public int loaclPort()
IoSessionpublic String remoteAddress()
IoSessionremoteAddress 在类中 IoSession<AioSocket>public int remotePort()
IoSessionremotePort 在类中 IoSession<AioSocket>protected int read0(ByteBuffer buffer) throws IOException
IoSessionread0 在类中 IoSession<AioSocket>buffer - 接收数据的缓冲区IOException - IO 异常protected int send0(ByteBuffer buffer) throws IOException
IoSessionsend0 在类中 IoSession<AioSocket>buffer - 发送缓冲区IOException - IO 异常protected MessageSplitter getMessagePartition()
IoSessiongetMessagePartition 在类中 IoSession<AioSocket>public boolean isConnected()
IoSessionisConnected 在类中 IoSession<AioSocket>public void restart()
throws IOException,
RestartException
IOException - IO 异常RestartException - 重新启动的异常Copyright © 2017 Voovan. All rights reserved.