public class TCPServer
extends java.lang.Object
| Constructor and Description |
|---|
TCPServer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(IPAddress ipAddress,
int port)
Closes the created TCP connection listener by address and port.
|
static TCPListener |
open(HTTPBinding binding,
TCPConnectionHandler handler)
Opens a server socket for a given address and port.
|
public static TCPListener open(HTTPBinding binding, TCPConnectionHandler handler) throws java.io.IOException
This will start a new TCP listener for the given address and port. This listener will pass-through the incoming TCP connection to the given TCP handler.
address - the address.port - the port.handler - the TCP connection handler which will handle the incoming TCP connection.java.io.IOException - will throw an IO exception if the server socket could not be opened.public static void close(IPAddress ipAddress, int port) throws java.io.IOException
address - the address.port - the port.java.io.IOException