/**
@mainpage

## Introduction

The Secure Sockets interface is based on the Berkeley sockets interface with the addition of a secure communication option by TLS protocol. At this time, only client APIs are supported.

The FreeRTOS Secure Socket API allows you to create embedded applications that communicate securely. It is designed for easy onboarding of software developers from various network programming backgrounds. The reference implementation for Secure Sockets supports TLS and TCP/IP over Ethernet and Wi-Fi. 

## Secure Sockets Library dependencies

@dot "Secure Sockets Library dependencies"
digraph library_dependencies
{
    node[shape=box, fontname=Helvetica, fontsize=10, style=filled];
    edge[fontname=Helvetica, fontsize=10];
    high_level[label="Secure Sockets Library", fillcolor="#aed8a9ff"];
    low_level1[label="FreeRTOS+TCP", fillcolor="#e89025ff"];
    low_level2[label="TLS Layer", fillcolor="#e89025ff"];
    low_low_level2[label="mbedTLS", fillcolor="#e89025ff"];
    high_level -> low_level1 [style="dashed"];
    high_level -> low_level2 [style="dashed"];
    low_level2 -> low_low_level2 [style="dashed"];
}
@enddot

*/

/**
@config_page{SecureSockets}
@config_brief{library}

@section socketsconfigBYTE_ORDER
@brief Byte order of the target MCU must be defined. For detail, please refer to [Endian](https://freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/endian.html) in freertos.org

Valid values are pdLITTLE_ENDIAN and pdBIG_ENDIAN.

If this configuration is not set, compiler will generate an error warning about it, which is written in @ref iot_secure_sockets_config_defaults.h

@configpossible `pdLITTLE_ENDIAN` (little endian) or `pdBIG_ENDIAN` (big endian)<br>
@configrecommended must be set correctly for the MCU<br>
@configdefault `None`

@section socketsconfigDEFAULT_SEND_TIMEOUT
@brief Default socket send timeout.

The user can change the send timeout for a socket using the @ref SOCKETS_SetSockOpt API
with the SOCKETS_SO_SNDTIMEO option.

The unit is milliseconds that @ref SOCKETS_Send should wait before timing out.
Setting to 0 causes send to wait forever.

This configuration is defined in  @ref iot_secure_sockets_config_defaults.h

@configpossible `Any positive integer`<br>
@configdefault `10000`

@section socketsconfigDEFAULT_RECV_TIMEOUT
@brief Default socket receive timeout.

The user can change the receive timeout for a socket using the @ref SOCKETS_SetSockOpt API
with the SOCKETS_SO_RCVTIMEO option.

The unit is milliseconds that @ref SOCKETS_Recv should wait before timing out.
Setting to 0 causes receive to wait forever.

This configuration is defined in  @ref iot_secure_sockets_config_defaults.h

@configpossible `Any positive integer`<br>
@configdefault `10000`
*/

/**
@functions_page{SecureSockets,Secure Sockets}
@functions_brief{Secure Sockets}
- @subpage secure_sockets_function_primary
- @subpage secure_sockets_function_helper
@page secure_sockets_function_primary Primary Functions
- @function_name{secure_sockets_function_socket}
@function_brief{secure_sockets_function_socket}
- @function_name{secure_sockets_function_connect}
@function_brief{secure_sockets_function_connect}
- @function_name{secure_sockets_function_recv}
@function_brief{secure_sockets_function_recv}
- @function_name{secure_sockets_function_send}
@function_brief{secure_sockets_function_send}
- @function_name{secure_sockets_function_shutdown}
@function_brief{secure_sockets_function_shutdown}
- @function_name{secure_sockets_function_close}
@function_brief{secure_sockets_function_close}
- @function_name{secure_sockets_function_setsockopt}
@function_brief{secure_sockets_function_setsockopt}
- @function_name{secure_sockets_function_gethostbyname}
@function_brief{secure_sockets_function_gethostbyname}
@page secure_sockets_function_helper Helper Functions
- @subpage SOCKETS_htonl
- @subpage SOCKETS_ntohl
- @subpage SOCKETS_htons
- @subpage SOCKETS_ntohs
- @subpage SOCKETS_inet_addr_quick
- @subpage SOCKETS_inet_ntoa
*/

/**
@page secure_sockets_function_socket SOCKETS_Socket
@snippet iot_secure_sockets.h declare_secure_sockets_socket
@copydoc SOCKETS_Socket

@page secure_sockets_function_connect SOCKETS_Connect
@snippet iot_secure_sockets.h declare_secure_sockets_connect
@copydoc SOCKETS_Connect

@page secure_sockets_function_recv SOCKETS_Recv
@snippet iot_secure_sockets.h declare_secure_sockets_recv
@copydoc SOCKETS_Recv

@page secure_sockets_function_send SOCKETS_Send
@snippet iot_secure_sockets.h declare_secure_sockets_send
@copydoc SOCKETS_Send

@page secure_sockets_function_shutdown SOCKETS_Shutdown
@snippet iot_secure_sockets.h declare_secure_sockets_shutdown
@copydoc SOCKETS_Shutdown

@page secure_sockets_function_close SOCKETS_Close
@snippet iot_secure_sockets.h declare_secure_sockets_close
@copydoc SOCKETS_Close

@page secure_sockets_function_setsockopt SOCKETS_SetSockOpt
@snippet iot_secure_sockets.h declare_secure_sockets_setsockopt
@copydoc SOCKETS_SetSockOpt

@page secure_sockets_function_gethostbyname SOCKETS_GetHostByName
@snippet iot_secure_sockets.h declare_secure_sockets_gethostbyname
@copydoc SOCKETS_GetHostByName

*/

/**
@handles_group{SecureSockets}
@handles_brief{SecureSockets library}
@paramstructs_group{SecureSockets}
@paramstructs_brief{SecureSockets, secure sockets}

*/
