You can use the bind API function to bindanaddress (an interface and a port) to a socket endpoint.
您可以使用bind api函数来绑定一个地址(一个接口和一个端口)到一个套接字端点。
2
As mentioned in Bindings, dependencies, and constraints, this is one of the ways to bind user-supplied data to the instance. An example of the tag from our address form is shown in Listing 12.
正如在绑定、相关性和约束中提到的那样,这是将用户提供的数据绑定至实例的方法之一。
3
The bind call copies the local address specified by the process into an mbuf and calls sobind, which in turn calls tcp_usrreq with PRU_BIND as the request.