org.tentackle.net
Class CompressedServerSocket

java.lang.Object
  extended by java.net.ServerSocket
      extended by org.tentackle.net.CompressedServerSocket

public class CompressedServerSocket
extends ServerSocket

Zip-compressed server socket.

Author:
harald

Constructor Summary
CompressedServerSocket(int port)
          Creates a compressed server socket.
 
Method Summary
 Socket accept()
          Listens for a connection to be made to this socket and accepts it.
 
Methods inherited from class java.net.ServerSocket
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompressedServerSocket

public CompressedServerSocket(int port)
                       throws IOException
Creates a compressed server socket.

Parameters:
port - the port number, or 0 to use any free port.
Throws:
IOException
Method Detail

accept

public Socket accept()
              throws IOException
Description copied from class: java.net.ServerSocket
Listens for a connection to be made to this socket and accepts it. The method blocks until a connection is made.

A new Socket s is created and, if there is a security manager, the security manager's checkAccept method is called with s.getInetAddress().getHostAddress() and s.getPort() as its arguments to ensure the operation is allowed. This could result in a SecurityException.

Overrides:
accept in class ServerSocket
Returns:
the new Socket
Throws:
IOException - if an I/O error occurs when waiting for a connection.
See Also:
SecurityManager.checkAccept(java.lang.String, int)


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de