mbedtls_net_poll() function
Check and wait for the context to be ready for read/write
Arguments
rw
Bitflag composed of MBEDTLS_NET_POLL_READ and MBEDTLS_NET_POLL_WRITE specifying the events to wait for: - If MBEDTLS_NET_POLL_READ is set, the function will return as soon as the net context is available for reading. - If MBEDTLS_NET_POLL_WRITE is set, the function will return as soon as the net context is available for writing.
timeout
Maximal amount of time to wait before returning, in milliseconds. If \c timeout is zero, the function returns immediately. If \c timeout is -1u, the function blocks potentially indefinitely.
Return value
Bitmask composed of MBEDTLS_NET_POLL_READ/WRITE on success or timeout, or a negative return code otherwise.