Package com.iizix.nio
Interface ISocketComm
- All Superinterfaces:
IWorkerTimeout
- All Known Implementing Classes:
ServerSocketComm
,SocketComm
,SocketCommNIO
The interface for sockets or server sockets to implement for processing events.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionboolean
close
(boolean rightNow) Called when the socket should be closed.void
process
(ByteBuffer buf) Called for the selection key associated with the ISocketComm implementor (normally SocketComm and ServerSocketComm) to process data.Methods inherited from interface com.iizix.nio.IWorkerTimeout
checkTimeout, getRemainingTimeout
Method Details
process
Called for the selection key associated with the ISocketComm implementor (normally SocketComm and ServerSocketComm) to process data.close
boolean close(boolean rightNow) Called when the socket should be closed.- Parameters:
rightNow
- If true, the (server) socket channel is closed immediately, otherwise (SocketChannel), the socket may flush all output before closing.- Returns:
- true if closed, false if already closed.