SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
This section provides information on how to establish a secured socket session with BSD API. A secured socket is a TCP socket, which encrypts and decrypts data. The BSD flow is the same as regular TCP socket BSD, excluding specific secured socket options.
There are two ways to open secured socket:
When the connection is established, it is possible to use sl_Recv and sl_Send to transact data between the peers, exactly like in an unsecured TCP socket.
Some dedicated TLS configurations (performed by calling sl_SetSockOpt) must be applied after opening the socket, and not after sl_Connect in client mode or sl_Listen in server mode, as described in Section 8.5.