| java.lang.Object java.lang.Thread org.datashare.TcpSocketServer
TcpSocketServer | public class TcpSocketServer extends Thread implements SocketServerInterface(Code) | | One of these is needed for every TCP port that is to used for communicating with Clients.
This class is given a port number, and when Clients establish a connection to that port,
a TCP socket handler is created to communicate over that socket with the Client.
The design of this class is such that if this socket closes (through some type of error),
the socket connections to other clients that have already been established will remain
functional, but no new clients can be added to the connection/channel.
|
Field Summary | |
public boolean | running |
running | public boolean running(Code) | | |
TcpSocketServer | public TcpSocketServer(DataReceiverInterface dri, int port, int priority)(Code) | | Constructor, creates a server socket on the specified port
|
close | public void close()(Code) | | close the socket, stop any thread, and notify the server
|
getKeyValue | public String getKeyValue()(Code) | | returns the unique key value string for this server socket instance
|
getLocalPort | public int getLocalPort()(Code) | | return our local port
|
getReady | public boolean getReady()(Code) | | returns true if ready to receive connections
|
killThread | public void killThread()(Code) | | this method will stop this class from creating sockets and will kill this thread
|
|
|