SummerCalls 2015-06-11 06:18 采纳率: 33.3%
浏览 1664

关于TCP中的【backlog】疑问

《TCP/IP详解卷1 协议》第2版中写道:

Linux% sock -s -v -q1 -O30000 6666

The -q1 option sets the backlog of the listening endpoint to 1.The -O30000
option causes the program to sleep for 30,000s(basically a long time,about 8
hours) before accepting any client connections.If we now try to connect to this
server continually,the first four connections are completed immediately.After
that,two connections are completed every 9s.Other operating systems vary
considerably in how this is handled.In Solaris 8 and FreeBSD 4.7,for example,
two connections are handled immediately and the third times out;subsequent
connections time out as well.

我不懂的是命令设置了backlog=1,那么后面的

"If we now try to connect to this server continually,the first four connections
are completed immediately.After that,two connections are completed every 9s."

"In Solaris 8 and FreeBSD 4.7,for example,
two connections are handled immediately and the third times out"
是怎么回事?

求详解,谢谢大神!

  • 写回答

3条回答

  • oyljerry 2015-06-11 11:57
    关注

    因为backlog =1 那么,你的第一个连接可以马上处理,而第二个放到backlog中,但是第三个来的时候就会超时丢掉了

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向