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中,但是第三个来的时候就会超时丢掉了

    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧