What does ChannelOption.SO_BACKLOG do?

jestro picture jestro · Dec 28, 2012 · Viewed 19.6k times · Source
.option(ChannelOption.SO_BACKLOG, 100)

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

Thanks!

Answer

miku picture miku · Dec 28, 2012

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

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.