ChannelOption.SO_BACKLOG做什么? [英] What does ChannelOption.SO_BACKLOG do?

查看:950
本文介绍了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.



查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆