SO_REUSEADDR & SO_REUSEPORT

Wonderful explaination about SO_REUSEADDR and SO_REUSEPORT.

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Main purpose of SO_REUSEADDR:

1) When a socket have already been binded to 0.0.0.0:port, another socket can be binded to an exactly IP and the same port as before.

2) If a socket was closed and is in state TIME_WAIT, it's ip&port can be binded by another socket.

posted @ 2016-08-02 17:56  tanghuimin0713  阅读(178)  评论(0编辑  收藏  举报