Can multiple sockets bind to same port?

Nguyễn Tân

New member
Can multiple sockets bind to same port?
Answer
Yes. Multiple listening TCP sockets, all bound to the same port, can co-exist, provided they are all bound to different local IP addresses. … Multiple UDP sockets all bound to the same port can all co-exist provided either the same condition as at (1) or they have all had the SO_REUSEADDR option set before binding.
 

Tìm kiếm

Back
Top