美文网首页
关于setsockopt(socket.SOL_SOCKET,s

关于setsockopt(socket.SOL_SOCKET,s

作者: 黑小柴 | 来源:发表于2019-10-11 11:29 被阅读0次

UDP doesn't have connections, so there's nothing analogous to TIME_WAIT. You don't need to use SO_REUSEADDR.

If you're listening on a broadcast or multicast address, you might need to use SO_REUSEPORT, so that if there are multiple listeners on the same machine they don't conflict. However, from what I can tell, this doesn't exist on Linux.

事实上还是有用的,不信试试

相关文章

网友评论

      本文标题:关于setsockopt(socket.SOL_SOCKET,s

      本文链接:https://www.haomeiwen.com/subject/zktfuctx.html