Class AsyncServerSocket

java.lang.Object
org.nustaq.kontraktor.asyncio.AsyncServerSocket
Direct Known Subclasses:
NIOServerConnector

public class AsyncServerSocket
extends java.lang.Object
Created by ruedi on 04/05/15. Implements NIO based TCP server
  • Constructor Summary

    Constructors 
    Constructor Description
    AsyncServerSocket()  
  • Method Summary

    Modifier and Type Method Description
    void close()  
    void connect​(int port, java.util.function.BiFunction<java.nio.channels.SelectionKey,​java.nio.channels.SocketChannel,​AsyncSocketConnection> connectionFactory)  
    boolean isClosed()  
    void receiveLoop()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • connect

      public void connect​(int port, java.util.function.BiFunction<java.nio.channels.SelectionKey,​java.nio.channels.SocketChannel,​AsyncSocketConnection> connectionFactory) throws java.io.IOException
      Throws:
      java.io.IOException
    • receiveLoop

      public void receiveLoop()
    • isClosed

      public boolean isClosed()
    • close

      public void close() throws java.io.IOException
      Throws:
      java.io.IOException