Package org.nustaq.kontraktor.asyncio
Class AsyncServerSocket
java.lang.Object
org.nustaq.kontraktor.asyncio.AsyncServerSocket
- Direct Known Subclasses:
NIOServerConnector
Created by ruedi on 04/05/15.
Implements NIO based TCP server
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconnect(int port, BiFunction<SelectionKey, SocketChannel, AsyncSocketConnection> connectionFactory) booleanisClosed()void
-
Constructor Details
-
AsyncServerSocket
public AsyncServerSocket()
-
-
Method Details
-
connect
public void connect(int port, BiFunction<SelectionKey, SocketChannel, throws IOExceptionAsyncSocketConnection> connectionFactory) - Throws:
IOException
-
receiveLoop
public void receiveLoop() -
isClosed
public boolean isClosed() -
close
- Throws:
IOException
-