backlog - 套接字积压。如果该值小于或等于零,则使用系统默认值。
系统默认值对应的值是多少?
最佳答案
它取决于操作系统。对于某些操作系统,这是一个可以由系统管理员配置的设置。
例如,Linux 的 man 2 Listen
says :
Since Linux 5.4, the default in this file is 4096; in earlier kernels, the default value is 128. In kernels before 2.4.25, this limit was a hard coded value,
SOMAXCONN
, with the value 128.
相比之下,在 Windows 上 description backlog
参数表示:
The maximum length of the queue of pending connections. If set to
SOMAXCONN
, the underlying service provider responsible for sockets will set the backlog to a maximum reasonable value.
关于java - java http服务器上系统默认backlog值对应的值是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68739476/