What value of backlog should I use?

后端 未结 2 744
花落未央
花落未央 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:02

    It's a fight between clients trying to connect. pushing accept requests onto the queue, and the accept thread/s sucking them off. Usually, the threads win. I usually set at 32, but it's not usually an important parameter.

提交回复
热议问题