Socket Option Id#
Silicon Labs vendor extensions#
These option ids are NOT part of the OSF / CMSIS IoT Socket specification. They are defined only for the SiWx91x BSD-backed IoT Socket wrapper and are non-portable. Code that needs to run against any other IoT Socket implementation must guard these option ids with #ifdefIOT_SOCKET_VENDOR_SILABS. The standard CMSIS IoT Socket option ids occupy values 1..5; the 0x1100+ range is reserved for Silicon Labs vendor extensions.
Marker that the SiLabs vendor extensions below are available.
Enable TLS on a stream socket (Silicon Labs vendor extension).
Macros#
Non-blocking I/O (Set only, default = 0); opt_val = &nbio, opt_len = sizeof(nbio), nbio (integer): 0=blocking, non-blocking otherwise.
Receive timeout in ms (default = 0); opt_val = &timeout, opt_len = sizeof(timeout)
Send timeout in ms (default = 0); opt_val = &timeout, opt_len = sizeof(timeout)
Keep-alive messages (default = 0); opt_val = &keepalive, opt_len = sizeof(keepalive), keepalive (integer): 0=disabled, enabled otherwise.
Socket Type (Get only); opt_val = &socket_type, opt_len = sizeof(socket_type), socket_type (integer): IOT_SOCKET_SOCK_xxx.