HP Rp3440-4 - 9000 - 0 MB RAM Programmer's Manual page 64

Bsd sockets interface programmer’s guide
Hide thumbs Also See for Rp3440-4 - 9000 - 0 MB RAM:
Table of Contents

Advertisement

Advanced Topics for Stream Sockets
Socket Options
• SO_RCVTIMEO
The following socket options toggle socket behavior. optval is an integer
containing a boolean flag for the behavior (1 = on, 0 = off):
• SO_KEEPALIVE
• SO_DEBUG
• SO_DONTROUTE
• SO_USELOOPBACK
• SO_REUSEADDR
• SO_OOBINLINE
• SO_REUSEPORT
The SO_LINGER option is a combination. It sets a linger value, and also
toggles linger behavior on and off. In previous releases
SO_DONTLINGER was supported. For SO_LINGER, optval points to a
struct linger, defined in /usr/include/sys/socket.h. The
structure contains an integer boolean flag to toggle behavior on/off, and
an integer linger value. Refer to the getsockopt(2) man page for more
information on getsockopt.
setsockopt and its parameters are described in the following table:
Include files:
#include <sys/types.h>
#include <sys/socket.h>
System call:
setsockopt(s, level, optname, optval, optlen)
int s, level, optname;
char *optval;
int optlen;
Parameter
s
socket descriptor
level
protocol level
64
Description of
Contents
INPUT Value
socket descriptor for
which options are to be set
SOL_SOCKET
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents