
Sockets Programming Interfaces
3-19
Sockets and Stream IO API
SO_DONTROUTE
Indicates that outgoing messages should bypass
the standard routing facilities. Instead, messages
are directed to the appropriate network interface
according to the network portion of the destination
address.
SO_LINGER
Controls the action taken when unsent messages
are queued on socket and a close is performed. If
the socket promises reliable delivery of data and
SO_LINGER is set, the system will block the pro-
cess on the close attempt until it is able to transmit
the data or until it decides it is unable to deliver the
information (a timeout period, termed the linger in-
terval, is specified in seconds in the setsockopt call
when SO_LINGER is requested). If SO_LINGER is
disabled and a close is issued, the system will pro-
cess the close in a manner that allows the process
to continue as quickly as possible.
SO_BROADCAST
Requests permission to send broadcast datagrams
on the socket. Broadcast was a privileged operation
in earlier versions of the system.
SO_OOBINLINE
With protocols that support out-of-band data, this
option requests that out-of-band data be placed in
the normal data input queue as received; it will then
be accessible with recv or read calls without the
MSG_OOB flag. Some protocols always behave as
if this option is set.
SO_SNDBUF
Buffer size for output
SO_RCVBUF
Buffer size for input
SO_SNDLOWAT
Is an option to set the minimum count for output op-
erations. Most output operations process all of the
data supplied by the call, delivering data to the pro-
tocol for transmission and blocking as necessary for
flow control. Non-blocking output operations will
process as much data as permitted subject to flow
control without blocking, but will process no data if
flow control does not allow the smaller of the low
water mark value or the entire request to be pro-
cessed. A select operation testing the ability to write
to a socket will return true only if the low water mark
amount could be processed. The default value for
SO_SNDLOWAT is set to a convenient size for net-
work efficiency, often 1024.