![]() |
Embedded TCP/IP stack
4.7.0
|
| fnet_return_t fnet_socket_setopt | ( | fnet_socket_t | s, |
| fnet_protocol_t | level, | ||
| fnet_socket_options_t | optname, | ||
| const void * | optval, | ||
| fnet_size_t | optvallen | ||
| ) |
Sets a socket option.
| s | Descriptor identifying a socket. |
| level | Level, at which the option is defined. The supported levels are SOL_SOCKET, IPPROTO_IP, IPPROTO_IPV6 or IPPROTO_TCP. |
| optname | Socket option for which the value is to be set. |
| optval | Pointer to a buffer, in which the value for the requested option is supplied. |
| optvallen | Size of the optval buffer. |
This function sets the current value for a socket option associated with the specified socket.
The various socket options are described by the fnet_socket_options_t.