netconn_bind() — Set local IP address/port of a netconn


err_t netconn_bind (struct netconn *conn , struct ip_addr *addr , u16_t port );


Binds the connection conn to the local IP address addr and TCP or UDP port port. If addr is NULL, the local IP address is determined by the networking system.

The addr is defined as a pointer to an IPv4 address, though the routine will accept a suitably cast IPv6 address structure pointer. However the netconn_bind_ip6() function provides explicit IPv6 address support.