public class Server
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Server.Builder |
Modifier and Type | Method and Description |
---|---|
void |
start(ServerEventListener listener)
Starts a new thread that listens on the configured port.
|
void |
stop()
Stop listening for new connections.
|
public void start(ServerEventListener listener) throws java.io.IOException
listener
- the ServerConnectionListener that will be notified when remote clients are connecting or the server
stopped listening.java.io.IOException
- if any kind of error occures while creating the server socket.public void stop()