-
- All Implemented Interfaces:
public abstract class AbstractTcpListenerAn abstract class that binds on a set of sockets and accepts sessions that start with a STUN Binding Request (preceded by an optional fake SSL handshake). The handling of the accepted sessions (e.g. handling in ICE) is left to the implementations. This instance runs two threads: acceptThread and readThread. The 'accept' thread just accepts new Sockets and passes them over to the 'read' thread. The 'read' thread reads a STUN message from an accepted socket and, based on the STUN username, passes it to the appropriate session.
-
-
Constructor Summary
Constructors Constructor Description AbstractTcpListener(int port)Initializes a new TcpHarvester, which is to listen on port number port on all IP addresses on all available interfaces. AbstractTcpListener(int port, List<NetworkInterface> interfaces)Initializes a new TcpHarvester, which is to listen on port number port on all the IP addresses on the specified NetworkInterfaces. AbstractTcpListener(List<TransportAddress> transportAddresses)Initializes a new TcpHarvester, which is to listen on the specified list of TransportAddresses.
-
Method Summary
Modifier and Type Method Description voidclose()Triggers the termination of the threads of this MultiplexingTcpHarvester. -
-
Constructor Detail
-
AbstractTcpListener
AbstractTcpListener(int port)
Initializes a new TcpHarvester, which is to listen on port number port on all IP addresses on all available interfaces.- Parameters:
port- the port to listen on.
-
AbstractTcpListener
AbstractTcpListener(int port, List<NetworkInterface> interfaces)
Initializes a new TcpHarvester, which is to listen on port number port on all the IP addresses on the specified NetworkInterfaces.- Parameters:
port- the port to listen on.interfaces- the interfaces to listen on.
-
AbstractTcpListener
AbstractTcpListener(List<TransportAddress> transportAddresses)
Initializes a new TcpHarvester, which is to listen on the specified list of TransportAddresses.- Parameters:
transportAddresses- the transport addresses to listen on.
-
-
Method Detail
-
close
void close()
Triggers the termination of the threads of this MultiplexingTcpHarvester.
-
-
-
-