org.tentackle.net
Class CompressedServerSocket
java.lang.Object
java.net.ServerSocket
org.tentackle.net.CompressedServerSocket
public class CompressedServerSocket
- extends ServerSocket
Zip-compressed server socket.
- Author:
- harald
|
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 |
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
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