linux重用端口号,是否可以在linux中重用TCP端口号 (is it possible to reuse TCP port numbers in linux)...
发布日期:2021-06-24 17:49:03 浏览次数:2 分类:技术文章

本文共 496 字,大约阅读时间需要 1 分钟。

2 processes can listen on the same port. They would both be calling accept and only one would get accept returned with the first client.

You can open the port, spawn 100 children and have them accept(socket) all at the same time, and they will be receiving equally the new connections, one each, never the same obviously.

If you want to do it from non-related processes, the SO_REUSEPORT flag allows multiple processes to bind to the same address provided all of them use the SO_REUSEPORT option.

转载地址:https://blog.csdn.net/weixin_34220029/article/details/116639619 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:linux 压缩文件夹成bin,Linux 生成系统升级包(bin文件)
下一篇:linux更换内核后无法上网,求助:更改内核配置后无法启动wine

发表评论

最新留言

感谢大佬
[***.8.128.20]2024年04月13日 20时01分09秒