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() reads 1 variable and writes 1 variable:
![]()
mbedtls_net_connect()