What does ChannelOption.SO_BACKLOG do?

java, netty

Solution

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

Problem

``` .option(ChannelOption.SO_BACKLOG, 100) ``` is shown in the Netty 4 upgrade doc. Can you explain what it does? Thanks!

Original source