Socket Options in Java
public void setSoLinger(boolean on, int linger);
Enable/disable SO_LINGER with the specified linger
public void setSoTimeout(int timeout);
Enable/disable SO_TIMEOUT with the specified timeout, in
public void setTcpNoDelay(boolean on);
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm).
public int getSoLinger();
Returns setting for SO_LINGER.
public int getSoTimeout();
Returns setting for SO_TIMEOUT.
public boolean getTcpNoDelay();
Tests if TCP_NODELAY is enabled.
public void setSendBufferSize(int size);
Sets the SO_SNDBUF option to the specified value for this