tcp_bind()

Name

tcp_bind() -- Bind PCB to local IP address and port

Synopsis

err_t tcp_bind(struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t port);

Description

Binds pcb to a local IP address and port number. The IP address can be specified as IP_ADDR_ANY in order to bind the connection to all local IP addresses.

Return value

If another connection is bound to the same port, the function will return ERR_USE, otherwise ERR_OK is returned.

2017-02-09
Documentation license for this page: eCosPro License