Reputation: 2010
Is the child socket created after
int accept(__fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
bound to a local address, if not why?
Upvotes: 0
Views: 229
Reputation: 597016
Yes, it is bound to a local IP/port. It is bound to the specific local IP that accepted the connection request (especially if the listening socket is bound to multiple local IPs via a wildcard IP, like INADDR_ANY
), and to the same local port that the listening socket is bound to.
Upvotes: 2