Based on definition in network-interface, the return value is defined as negative value to indicate error.
This patch set the return code of TLS_FreeRTOS_send/TLS_FreeRTOS_recv to negative value once send/recv fail.
@brief Transport interface for receiving data on the network.
...
@return The number of bytes received or a negative value to indicate error.
typedef int32_t ( TransportRecv_t )( NetworkContext_t pNetworkContext, ...
@brief Transport interface for sending data over the network.
...
@return The number of bytes sent or a negative value to indicate error.
typedef int32_t ( TransportSend_t )( NetworkContext_t pNetworkContext, ...
Based on definition in network-interface, the return value is defined as negative value to indicate error. This patch set the return code of TLS_FreeRTOS_send/TLS_FreeRTOS_recv to negative value once send/recv fail.