Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does ChannelOption.SO_BACKLOG do?

Tags:

java

netty

.option(ChannelOption.SO_BACKLOG, 100)

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

Thanks!

like image 369
jestro Avatar asked Dec 28 '12 20:12

jestro


1 Answers

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
like image 168
miku Avatar answered Sep 24 '22 12:09

miku