What does ChannelOption.SO_BACKLOG do?

后端 未结 1 325
借酒劲吻你
借酒劲吻你 2021-01-31 08:47
.option(ChannelOption.SO_BACKLOG, 100)

is shown in the Netty 4 upgrade doc. Can you explain what it does?

Thanks!

1条回答
  •  礼貌的吻别
    2021-01-31 09:50

    It's a passed through socket option determining the number of connections queued.

    • http://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html

    The maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused.

    • More on netty channels: http://seeallhearall.blogspot.de/2012/06/netty-tutorial-part-15-on-channel.html

    0 讨论(0)
提交回复
热议问题