Maximum number of milliseconds to wait for data 0 means no timeout (wait forever)
Return value
the number of bytes received, or a non-zero error code: MBEDTLS_ERR_SSL_TIMEOUT if the operation timed out, MBEDTLS_ERR_SSL_WANT_READ if interrupted by a signal.
Notes
This function will block (until data becomes available or timeout is reached) even if the socket is set to non-blocking. Handling timeouts with non-blocking reads requires a different strategy.
Examples
mbedtls_net_recv_timeout() is referenced by 6 libraries and example projects: