加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

监听系统调用中的积压值

发布时间:2020-12-16 03:11:36 所属栏目:百科 来源:网络整理
导读:我对听系统调用中的积压值有疑问.从监听系统调用的手册页. If the backlog argument is greater than the value in /proc/sys/net/core/somaxconn,then it is silently truncated to that value; the default value in this file is 128. 这意味着我的服务器
我对听系统调用中的积压值有疑问.从监听系统调用的手册页.

If the backlog argument is greater than the value in /proc/sys/net/core/somaxconn,then it is silently truncated to that value; the default value in this file is 128.

这意味着我的服务器一次只能接受< 128连接.如果我想接受更多的连接怎么办?我可以简单地将值设置为可能的最大数量,以便我可以访问更多的连接数量?

解决方法

该数字只是连接队列的大小,新连接等待某人接受它们.一旦您的应用程序调用accept(),就会从该队列中删除等待的连接.所以,你绝对可以处理超过128个并发连接,因为他们通常只花费很短的时间在队列中.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读