What value of backlog should I use?

后端 未结 2 742
花落未央
花落未央 2021-02-13 09:53

I read the man 2 listen.

I don\'t understand what is the backlog value, it says

The backlog argument defines the maximum length to which the queu

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-13 10:17

    Basically, what the listen() backlog affects is how many incoming connections can queue up if your application isn't accept()ing connections as soon as they come in. It's not particularly important to most applications. The maximum value used by most systems is 128, and passing that is generally safe.

提交回复
热议问题