mbedtls_net_connect() function
Initiate a connection with host:port in the given protocol
Arguments
proto
Protocol: MBEDTLS_NET_PROTO_TCP or MBEDTLS_NET_PROTO_UDP
Return value
0 if successful, or one of: MBEDTLS_ERR_NET_SOCKET_FAILED, MBEDTLS_ERR_NET_UNKNOWN_HOST, MBEDTLS_ERR_NET_CONNECT_FAILED
Notes
Sets the socket in connected mode even with UDP.
mbedtls_net_connect() calls 5 functions:
![]()
mbedtls_net_connect()
mbedtls_net_connect() reads 6 variables and writes 4 variables:
![]()
mbedtls_net_connect()