com.lukasfeiler.tcpserver
Class TCPServer
java.lang.Object
java.net.ServerSocket
com.lukasfeiler.tcpserver.TCPServer
- Direct Known Subclasses:
- HTTPServer
- public class TCPServer
- extends java.net.ServerSocket
|
Constructor Summary |
TCPServer(int port,
java.net.InetAddress bindAddr,
int connectionTimeout,
int connectionLifetime,
int connectionMaximum,
int connectionMaximumDelay,
int connectionQueueLength)
|
| Methods inherited from class java.net.ServerSocket |
accept, bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TCPServer
public TCPServer(int port,
java.net.InetAddress bindAddr,
int connectionTimeout,
int connectionLifetime,
int connectionMaximum,
int connectionMaximumDelay,
int connectionQueueLength)
throws java.io.IOException
getConnectionTimeout
public int getConnectionTimeout()
getConnectionLifetime
public long getConnectionLifetime()
getConnectionMaximum
public int getConnectionMaximum()
getConnectionMaximumDelay
public int getConnectionMaximumDelay()
getConnectionQueueLength
public int getConnectionQueueLength()
removeSocket
public void removeSocket(java.lang.Integer socketId)
stop
public void stop()
start
protected void start()
socketFactory
public TCPSocket socketFactory(java.net.Socket tcpSocket,
java.lang.Integer socketId,
TCPServer tcpServer,
int connectionTimeout)
throws java.io.IOException
- Throws:
java.io.IOException
connectionMaximumReached
public boolean connectionMaximumReached()
connectionMaximumExceeded
public boolean connectionMaximumExceeded()
main
public static void main(java.lang.String[] args)