栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Linux上TCP重传的应用程序控制

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux上TCP重传的应用程序控制

看起来是在内核2.6.37中添加的。
从下面的更改日志中提交来自内核Git的差异和摘录;

提交dca43c75e7e545694a9dd6288553f55c53e2a3a3作者:Jerry Chu日期:Fri Aug 27 19:13:28
2010 +0000

tcp: Add TCP_USER_TIMEOUT socket option.This patch provides a "user timeout" support as described in RFC793. Thesocket option is also needed for the the local half of RFC5482 "TCP UserTimeout Option".TCP_USER_TIMEOUT is a TCP level socket option that takes an unsigned

int,
when > 0, to specify the maximum amount of time in ms that transmitted
data may remain unacknowledged before TCP will forcefully close the
corresponding connection and return ETIMEDOUT to the application. If
0 is given, TCP will continue to use the system default.

Increasing the user timeouts allows a TCP connection to survive extendedperiods without end-to-end connectivity. Decreasing the user timeoutsallows applications to "fail fast" if so desired. Otherwise it may takeupto 20 minutes with the current system defaults in a normal WANenvironment.The socket option can be made during any state of a TCP connection, butis only effective during the synchronized states of a connection(ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, or LAST-ACK).Moreover, when used with the TCP keepalive (SO_KEEPALIVE) option,TCP_USER_TIMEOUT will overtake keepalive to determine when to close aconnection due to keepalive failure.The option does not change in anyway when TCP retransmits a packet, norwhen a keepalive probe will be sent.This option, like many others, will be inherited by an acceptor from itslistener.Signed-off-by: H.K. Jerry Chu <hkchu@google.com>Signed-off-by: David S. Miller <davem@davemloft.net>


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/408723.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号