com.koushikdutta.async
Class AsyncNetworkSocket
java.lang.Object
com.koushikdutta.async.AsyncNetworkSocket
- All Implemented Interfaces:
- AsyncSocket, DataEmitter, DataSink
- Direct Known Subclasses:
- AsyncDatagramSocket
public class AsyncNetworkSocket
- extends java.lang.Object
- implements AsyncSocket
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
end
public void end()
- Specified by:
end in interface DataSink
isChunked
public boolean isChunked()
- Specified by:
isChunked in interface DataEmitter
onDataWritable
public void onDataWritable()
write
public void write(ByteBufferList list)
- Specified by:
write in interface DataSink
write
public void write(java.nio.ByteBuffer b)
- Specified by:
write in interface DataSink
reportClose
protected void reportClose(java.lang.Exception e)
close
public void close()
- Specified by:
close in interface DataEmitter- Specified by:
close in interface DataSink
closeInternal
public void closeInternal()
setWriteableCallback
public void setWriteableCallback(WritableCallback handler)
- Specified by:
setWriteableCallback in interface DataSink
setDataCallback
public void setDataCallback(DataCallback callback)
- Specified by:
setDataCallback in interface DataEmitter
getDataCallback
public DataCallback getDataCallback()
- Specified by:
getDataCallback in interface DataEmitter
setClosedCallback
public void setClosedCallback(CompletedCallback handler)
- Specified by:
setClosedCallback in interface DataSink
getClosedCallback
public CompletedCallback getClosedCallback()
- Specified by:
getClosedCallback in interface DataSink
getWriteableCallback
public WritableCallback getWriteableCallback()
- Specified by:
getWriteableCallback in interface DataSink
setEndCallback
public void setEndCallback(CompletedCallback callback)
- Specified by:
setEndCallback in interface DataEmitter
getEndCallback
public CompletedCallback getEndCallback()
- Specified by:
getEndCallback in interface DataEmitter
isOpen
public boolean isOpen()
- Specified by:
isOpen in interface DataSink
pause
public void pause()
- Specified by:
pause in interface DataEmitter
resume
public void resume()
- Specified by:
resume in interface DataEmitter
isPaused
public boolean isPaused()
- Specified by:
isPaused in interface DataEmitter
getServer
public AsyncServer getServer()
- Specified by:
getServer in interface AsyncSocket- Specified by:
getServer in interface DataEmitter- Specified by:
getServer in interface DataSink
getRemoteAddress
public java.net.InetSocketAddress getRemoteAddress()
getLocalPort
public int getLocalPort()