public class NioTcpSession<T> extends NetSession<T>
| 限定符 | 构造器和说明 |
|---|---|
protected |
NioTcpSession(SocketChannel channel,
T message) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
关闭通道
|
InetSocketAddress |
getLocalAddress()
本地地址
|
InetSocketAddress |
getRemoteAddress()
远程地址
|
boolean |
isOpen()
通道是否开放中
|
T |
message()
解码后的消息
|
void |
writeAndFlush(ByteBuffer buffer)
写缓存
|
attachment, attachmentSetprotected NioTcpSession(SocketChannel channel, T message)
public void writeAndFlush(ByteBuffer buffer) throws IOException
writeAndFlush 在类中 NetSession<T>IOExceptionpublic T message()
message 在类中 NetSession<T>public InetSocketAddress getLocalAddress() throws IOException
NetSessiongetLocalAddress 在类中 NetSession<T>IOExceptionpublic InetSocketAddress getRemoteAddress() throws IOException
NetSessiongetRemoteAddress 在类中 NetSession<T>IOExceptionpublic boolean isOpen()
NetSessionisOpen 在类中 NetSession<T>public void close()
throws IOException
NetSessionclose 在类中 NetSession<T>IOExceptionCopyright © 2020. All rights reserved.