Comments
address usually set to INADDR_ANY – chooses a local address
Posted by waqasahmad
int status = bind(sockid, &addrport, size);
status: error status, = -1 if bind failed
sockid: integer, socket descriptor
addrport: struct sockaddr, the (IP) address and port of the machine (address usually set to INADDR_ANY – chooses a local address)
size: the size (in bytes) of the addrport structure
bind can be skipped for both types of sockets.
Posted by Fangzhou