What socket options are supported in Java?
Created May 4, 2012
Tim Rohaly
Java supports only a subset of options normally provided for BSD sockets. These are:
SO_LINGER | linger if data is present when socket is closed |
SO_RCVTIMEO | receive timeout (Java calls this SO_TIMEOUT) |
SO_SNDBUF | send buffer size |
SO_RCVBUF | receive buffer size |
TCP_NODELAY | don't wait for additional data before sending small packets |
SO_KEEPALIVE | (JDK 1.3+ only) periodically poll over the socket at the protocol level to keep it connected |