|
Sea 0.4.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.lbl.dsd.sea.nio.util.SocketOpts
Convenience class to get and set socket options; see SocketOptions
and Socket
for the corresponding keys and values.
For TCP performance tuning, see http://dsd.lbl.gov/TCP-tuning/ and in particular http://dsd.lbl.gov/TCP-tuning/buffers.html for how to increase the max socket buffer sizes allowed by the operating system (for MacOSX use the FreeBSD instructions as root user). Further useful information: http://www.psc.edu/networking/perf_tune.html
Field Summary |
Fields inherited from interface java.net.SocketOptions |
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY |
Constructor Summary | |
SocketOpts()
Creates an empty object (with all options yet undefined). |
|
SocketOpts(Socket socket)
Constructs and object containing the options of the given socket. |
Method Summary | |
void |
copyTo(Socket socket)
Copies the options from this object to the given socket. |
Object |
getOption(int optID)
Returns the given option |
void |
setOption(int optID,
Object value)
Sets the given option to the given value. |
String |
toString()
Returns a detailed string representation of the receiver. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SocketOpts()
public SocketOpts(Socket socket) throws SocketException
Method Detail |
public void setOption(int optID, Object value)
setOption
in interface SocketOptions
SocketOptions.setOption(int, java.lang.Object)
public Object getOption(int optID)
getOption
in interface SocketOptions
SocketOptions.getOption(int)
public void copyTo(Socket socket) throws SocketException
SocketException
public String toString()
|
Sea 0.4.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |