about backlog value in TCP

摘抄一段m$的kb

The WinSock listen() call backlog parameter under Windows NT version 3.5 and 3.51 accepts a maximum value of 100.

The maximum backlog parameter is 5 on Windows NT 4.0 Workstation, and 200 on Windows NT 4.0 Server.

WinSock server applications use the listen() call to establish a socket for listening for incoming connections. This calls second parameter, backlog, is defined as the maximum length to which the queue of pending connections may grow.

The WinSock version 1.1 specification states the maximum value for the backlog parameter is 5. However, Windows NT version 3.5 accepts up to 100 for this value.

Services that handle a large number of socket connections may be written to use a larger backlog value to prevent client connection requests from being dropped. This can be useful when writing applications such as World Wide WEB (WWW) and gopher servers.

src: http://support.microsoft.com/kb/127144

在Unix Network Programming V1, 3rd中也有一段类似的原话: Historically, sample code always shows a backlog of 5.

放到现在来看,并发数为5实在是太小了一点 Cool 

不过有一点实在想不通,按照OO的思想来看,底层kernel堆栈这种规定队列大小的细节,怎么会在listen这个普通的函数里完成呢?厄,实在是费解... 而且还是在这样一个貌似实例方法中.......更是匪夷所思了Confused

突然想起来,Unix Net.. 还有一段文字:... for a given listening socket, the kernel maintains two queues ... 所以实际上应该就是一个“实例”的方法

posted on 2008-05-29 16:02 micYng 阅读(131) 评论(0)  编辑 收藏 所属分类: Winsock series


标题  
姓名  
主页
Email (只有博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2008-05-29 16:57 编辑过
 
 


导航

公告

垃圾Comment,Spam杀无赦!

<2008年5月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

统计

与我联系

搜索

 

常用链接

留言簿(8)

我参与的团队

我的标签

随笔分类

随笔档案

文章分类

相册

收藏夹

.Net Enterprise Library

.Net Remoting

ASP.NET

Blog Friends:)

C# category

C# forum&blogs

C# Toolkit

CodeSmith Usages

cPP related

Design Pattern

Opensource project

Pervious Blog

Useful tip

积分与排名

最新评论

阅读排行榜

评论排行榜

60天内阅读排行