Package com.iizix.nio
Interface ISocketComm
- All Superinterfaces:
- IWorkerTimeout
 - All Known Implementing Classes:
- ServerSocketComm,- SocketComm,- SocketCommNIO
 - public interface ISocketComm extends IWorkerTimeout The interface for sockets or server sockets to implement for processing events.- Author:
- Christopher Mindus
 
- Method Summary- All Methods Instance Methods Abstract Methods - Modifier and Type - Method - Description - boolean- close(boolean rightNow)Called when the socket should be closed.- void- process(java.nio.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 Detail- process- void process(java.nio.ByteBuffer buf) 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.