public abstract class AsyncSocketConnection extends Object
| Modifier and Type | Field and Description |
|---|---|
protected SocketChannel |
chan |
protected SelectionKey |
key |
protected ByteBuffer |
readBuf |
protected Promise |
writePromise |
protected ByteBuffer |
writingBuffer |
| Constructor and Description |
|---|
AsyncSocketConnection(SelectionKey key,
SocketChannel chan) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite() |
protected void |
checkThread() |
void |
close() |
void |
closed(Exception ioe) |
abstract void |
dataReceived(ByteBuffer buf) |
protected IPromise |
directWrite(ByteBuffer buf) |
boolean |
isClosed() |
protected ByteBuffer readBuf
protected SelectionKey key
protected SocketChannel chan
protected Promise writePromise
protected ByteBuffer writingBuffer
public AsyncSocketConnection(SelectionKey key, SocketChannel chan)
public void closed(Exception ioe)
public void close()
throws IOException
IOExceptionprotected void checkThread()
protected IPromise directWrite(ByteBuffer buf)
public boolean canWrite()
public abstract void dataReceived(ByteBuffer buf)
public boolean isClosed()
Copyright © 2015. All rights reserved.