public final class Connection extends Object
| 构造器和说明 |
|---|
Connection(SocketChannel channel,
ConnectionHandler handler,
InetSocketAddress address) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearTimeout() |
void |
close() |
void |
close(boolean timeout,
Exception e) |
void |
close(Exception e) |
void |
connect(Selector selector) |
void |
connected(Reactor reactor,
Selector selector) |
boolean |
isConnected() |
boolean |
receive() |
void |
send() |
void |
send(ByteBuffer buffer,
Integer id) |
void |
setTimeout(int timeout,
TimeoutType type) |
SocketChannel |
socketChannel() |
void |
timeoutClose() |
public Connection(SocketChannel channel, ConnectionHandler handler, InetSocketAddress address)
public final void connect(Selector selector) throws IOException
IOExceptionpublic final void connected(Reactor reactor, Selector selector) throws ClosedChannelException
public final boolean isConnected()
public final SocketChannel socketChannel()
public void close(boolean timeout,
Exception e)
public final void close()
public final void timeoutClose()
public final void close(Exception e)
public final boolean receive()
public final void send(ByteBuffer buffer, Integer id)
public final void send()
public final void setTimeout(int timeout,
TimeoutType type)
public final void clearTimeout()
Copyright © 2018. All rights reserved.