Advanced Topics for Stream Sockets
Socket Options
Socket Options
The operation of sockets is controlled by socket level options. The
following options are supported for internet stream sockets:
• SO_REUSEADDR
• SO_KEEPALIVE
• SO_DONTROUTE
• SO_SNDBUF
• SO_RCVBUF
• SO_LINGER
• SO_USELOOPBACK
• SO_OOBINLINE
• SO_SNDLOWAT
• SO_RCVLOWAT
• SO_SNDTIMEO
• SO_RCVTIMEO
• SO_TYPE
• SO_ERROR
• SO_BROADCAST
• SO_REUSEPORT
All of these options may be used on either AF_INET or AF_UNIX
sockets; the following, however, are really INET specific in their function
and will not change UNIX socket behavior.
• SO_KEEPALIVE
• SO_REUSEADDR
• SO_DONTROUTE
• SO_USELOOPBACK
• SO_OOBINLINE
Chapter 3
61