ChannelOption.SO_BACKLOG做什么? [英] What does ChannelOption.SO_BACKLOG do?
本文介绍了ChannelOption.SO_BACKLOG做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
.option(ChannelOption.SO_BACKLOG, 100)
显示在Netty 4升级文档中。你能解释它的作用吗?
is shown in the Netty 4 upgrade doc. Can you explain what it does?
谢谢!
推荐答案
这是传递套接字选项确定排队的连接数。
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
传入连接指示(连接请求)的最大队列长度设置为backlog参数。如果队列已满时连接指示到达,则拒绝连接。
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.
- 有关netty频道的更多信息: http://seeallhearall.blogspot.de/2012/06/netty -tutorial-part-15-on-channel.html
- More on netty channels: http://seeallhearall.blogspot.de/2012/06/netty-tutorial-part-15-on-channel.html
这篇关于ChannelOption.SO_BACKLOG做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文