Package com.enterprisedt.util.proxy
Interface StreamServerSocket
- All Known Implementing Classes:
PlainServerSocket
public interface StreamServerSocket
Description
- Version:
- $Revision$
- Author:
- Bruce Blackshaw
-
Method Summary
Modifier and TypeMethodDescriptionAccept a connection on this socketvoidbind(SocketAddress endpoint) voidclose()Close the socketReturns the address to which the socket is connected.intReturns the local port to which this socket is bound.intGets the value of SO_RCVBUFintReturns setting for SO_TIMEOUT.voidsetReceiveBufferSize(int size) Sets the SO_RCVBUF optionvoidsetSoTimeout(int timeout) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
-
Method Details
-
acceptConnection
Accept a connection on this socket- Throws:
IOException
-
close
Close the socket- Throws:
IOException
-
setSoTimeout
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.- Parameters:
timeout-- Throws:
SocketExceptionIOException
-
getSoTimeout
Returns setting for SO_TIMEOUT.- Throws:
IOException
-
getLocalPort
int getLocalPort()Returns the local port to which this socket is bound.- Returns:
- the local port
-
getInetAddress
InetAddress getInetAddress()Returns the address to which the socket is connected.- Returns:
- the remote IP address
-
getReceiveBufferSize
Gets the value of SO_RCVBUF- Throws:
SocketException
-
setReceiveBufferSize
Sets the SO_RCVBUF option- Throws:
SocketException
-
bind
- Throws:
IOException
-