public class TcpNioChannelAssistant extends Object implements ChannelAssistant<SocketChannel>
| 构造器和说明 |
|---|
TcpNioChannelAssistant(Config config) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close(SocketChannel target) |
Config |
getConfig() |
InetSocketAddress |
getLocalAddress(SocketChannel target) |
InetSocketAddress |
getRemoteAddress(SocketChannel target) |
boolean |
isValid(SocketChannel target) |
Frame |
read(SocketChannel target,
NioAttachment attachment,
ByteBuffer buffer) |
void |
write(SocketChannel target,
Frame frame) |
public TcpNioChannelAssistant(Config config)
public Config getConfig()
public void write(SocketChannel target, Frame frame) throws IOException
write 在接口中 ChannelAssistant<SocketChannel>IOExceptionpublic Frame read(SocketChannel target, NioAttachment attachment, ByteBuffer buffer)
public boolean isValid(SocketChannel target)
isValid 在接口中 ChannelAssistant<SocketChannel>public void close(SocketChannel target) throws IOException
close 在接口中 ChannelAssistant<SocketChannel>IOExceptionpublic InetSocketAddress getRemoteAddress(SocketChannel target) throws IOException
getRemoteAddress 在接口中 ChannelAssistant<SocketChannel>IOExceptionpublic InetSocketAddress getLocalAddress(SocketChannel target) throws IOException
getLocalAddress 在接口中 ChannelAssistant<SocketChannel>IOExceptionCopyright © 2024. All rights reserved.