188
K
DAK
KwikNet TCP/IP Sockets
Option SO_BROADCAST requests permission to send broadcast datagrams on the socket.
Option SO_OOBINLINE, used with protocols that support out-of-band data, requests that
out-of-band data be placed in the normal data queue as it is encountered. The data will
then be accessible with the kn_recv() call without the need to specify the MSG_OOB flag.
Option SO_LINGER controls the action taken when unsent messages remain queued on a
socket at the time a kn_close() request to delete the socket is made. If the socket
promises reliable delivery of data and
SO_LINGER is set, KwikNet will block the caller on
the
kn_close() attempt until it is able to successfully transmit the data or until it decides
it is unable to do so. A timeout period, termed the linger interval, is specified in the
kn_setsockopt() call at the time option SO_LINGER is enabled. If SO_LINGER is
disabled at the time that a
kn_close() request is issued, KwikNet will process the close in
a manner that allows the caller to resume as quickly as possible.
Options
SO_SNDBUF and SO_RCVBUF are used to adjust the normal buffer sizes allocated
for send and receive buffers respectively. The buffer size may be increased for high
volume connections or may be decreased to limit the possible backlog of incoming data.
These values reflect the total amount of data which can be buffered at the socket. The
receive buffer size determines the largest TCP window size which the socket will
advertise. The send buffer size determines the maximum number of bytes which can be
held in the socket pending acknowledgment of receipt by the peer. When a socket is
created, KwikNet sets both buffering limits to 8 Kbytes.
Options SO_SNDLOWAT and SO_RCVLOWAT set the minimum data count for send and
receive operations respectively.
Options SO_SNDTIMEO and SO_RCVTIMEO set a timeout value for send and receive
operations respectively. KwikNet does not support timeouts for send or receive.
Option SO_ERROR can be used to fetch the most recent error code recorded in the socket.
The socket's error code is then reset (cleared). This option is useful for checking for
asynchronously occurring socket errors.
Comments to this Manuals