码迷,mamicode.com
首页 > 其他好文 > 详细

SO_REUSEADDR & SO_REUSEPORT

时间:2016-08-02 19:08:30      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:

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.

SO_REUSEADDR & SO_REUSEPORT

标签:

原文地址:http://www.cnblogs.com/tanghuimin0713/p/5730206.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!