![]()  | 
![]()  | 
![]()  | 
![]()  | 
![]()  | 
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Set options associated with a socket
#include <sys/types.h>
#include <sys/socket.h>
int setsockopt( int s,
                int level,
                int optname, 
                const void * optval,
                socklen_t optlen );
Most socket-level options use an int parameter for optval. Others, such as the SO_LINGER, SO_SNDTIMEO, and SO_RCVTIMEO options, use structures that also let you get data associated with the option.
libsocket
Use the -l socket option to qcc to link against this library.
The setsockopt() function sets the options associated with a socket.
See getsockopt() for more detailed information.
| Safety: | |
|---|---|
| Cancellation point | Yes | 
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | Yes | 
ICMP, IP, TCP, and UDP protocols
![]()  | 
![]()  | 
![]()  | 
![]()  |