![]() |
WINC1500 IoT Software APIs
19.5.2
WINC Software API Reference Manual
|
Functions | |
NMI_API sint8 | setsockopt (SOCKET socket, uint8 u8Level, uint8 option_name, const void *option_value, uint16 u16OptionLen) |
Detailed Description
The setsockopt() function shall set the option specified by the option_name argument, at the protocol level specified by the level argument, to the value pointed to by the option_value argument for the socket specified by the socket argument.
Possible protocol level values supported are SOL_SOCKET and SOL_SSL_SOCKET. Possible options when the protocol level is SOL_SOCKET :
SO_SET_UDP_SEND_CALLBACK | Enable/Disable callback messages for sendto(). Since UDP is unreliable by default the user maybe interested (or not) in receiving a message of SOCKET_MSG_SENDTO for each call of sendto(). Enabled if option value equals TRUE, disabled otherwise. |
IP_ADD_MEMBERSHIP | Valid for UDP sockets. This option is used to receive frames sent to a multicast group. option_value shall be a pointer to Unsigned 32-bit integer containing the multicast IPv4 address. |
IP_DROP_MEMBERSHIP | Valid for UDP sockets. This option is used to stop receiving frames sent to a multicast group. option_value shall be a pointer to Unsigned 32-bit integer containing the multicast IPv4 address. |
Possible options when the protcol leve is SOL_SSL_SOCKET
SO_SSL_BYPASS_X509_VERIF | Allow an opened SSL socket to bypass the X509 certificate verification process. It is highly recommended NOT to use this socket option in production software applications. The option is supported for debugging and testing purposes. The option value should be casted to int type and it is handled as a boolean flag. |
SO_SSL_SNI | Set the Server Name Indicator (SNI) for an SSL socket. The SNI is a null terminated string containing the server name associated with the connection. It must not exceed the size of HOSTNAME_MAX_SIZE. |
SO_SSL_ENABLE_SESSION_CACHING | This option allow the TLS to cache the session information for fast TLS session establishment in future connections using the TLS Protocol session resume features. |
Function Documentation
◆ setsockopt()
NMI_API sint8 setsockopt | ( | SOCKET | socket, |
uint8 | u8Level, | ||
uint8 | option_name, | ||
const void * | option_value, | ||
uint16 | u16OptionLen | ||
) |
- Parameters
-
[in] sock Socket handler. [in] level protocol level. See description above. [in] option_name option to be set. See description above. [in] option_value pointer to user provided value. [in] option_len length of the option value in bytes.
- Returns
- The function shall return SOCK_ERR_NO_ERROR for successful operation and a negative value (indicating the error) otherwise.
Generated on Thu Jan 26 2017 22:15:21 for WINC1500 IoT Software APIs by
