mbedtls_net_bind() function
Create a receiving socket on bind_ip:port in the chosen protocol. If bind_ip == NULL, all interfaces are bound.
Arguments
bind_ip
IP to bind to, can be NULL
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_BIND_FAILED, MBEDTLS_ERR_NET_LISTEN_FAILED
Notes
Regardless of the protocol, opens the sockets and binds it. In addition, make the socket listening if protocol is TCP.
Examples
mbedtls_net_bind() is referenced by 6 libraries and example projects: