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 Link icon

    Modifier and Type
    Method
    Description
    boolean
    close(boolean rightNow)
    Called when the socket should be closed.
    void
    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 Link icon

    checkTimeout, getRemainingTimeout
  • Method Details Link icon

    • process Link icon

      void process(ByteBuffer buf)
      Called for the selection key associated with the ISocketComm implementor (normally SocketComm and ServerSocketComm) to process data.
    • close Link icon

      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.