IoSession.StatereadByteBufferChannel, sendByteBufferChannel| Modifier and Type | Method and Description |
|---|---|
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 事件
|
protected SocketChannel |
socketChannel()
获取SocketChannel 对象
|
String |
toString() |
cancelIdle, checkIdle, containAttribute, enabledMessageSpliter, flush, getAttribute, getAttributes, getFlushedObjects, getHeartBeat, getIdleInterval, getMessageLoader, getReadByteBufferChannel, getSendByteBufferChannel, getSSLParser, getState, read, removeAttribute, send, sendByBuffer, setAttribute, setFlushedObjects, setHeartBeat, setIdleInterval, setSSLParser, socketContext, syncRead, syncSend, waitpublic String localAddress()
localAddress in class IoSession<NioSocket>public int loaclPort()
public String remoteAddress()
remoteAddress in class IoSession<NioSocket>public int remotePort()
remotePort in class IoSession<NioSocket>protected SocketChannel socketChannel()
protected int read0(ByteBuffer buffer) throws IOException
IoSessionread0 in class IoSession<NioSocket>buffer - 接收数据的缓冲区IOException - IO 异常protected int send0(ByteBuffer buffer) throws IOException
IoSessionsend0 in class IoSession<NioSocket>buffer - 发送缓冲区IOException - IO 异常protected MessageSplitter getMessagePartition()
IoSessiongetMessagePartition in class IoSession<NioSocket>public boolean isConnected()
isConnected in class IoSession<NioSocket>public boolean isOpen()
public void restart()
throws IOException,
RestartException
IOException - IO 异常RestartException - 重新启动的异常Copyright © 2019 Voovan. All rights reserved.