Ad

How To Determine The Value Of Socket Listen() Backlog Parameter?

- 1 answer

How should I determine what to use for a listening socket's backlog parameter? Is it a problem to simply specify a very large number?

Ad

Answer

From the docs:

A value for the backlog of SOMAXCONN is a special constant that instructs the underlying service provider responsible for socket s to set the length of the queue of pending connections to a maximum reasonable value.

Ad
source: stackoverflow.com
Ad