本文介绍了设置TCP_NODELAY是否会影响套接字两端的行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直认为Nagle的算法会在两个方向上影响套接字,并且设置TCP_NODELAY
会以某种方式通知远端也要关闭Nagle.
I've always assumed that Nagle's algorithm affected the socket in both directions, and that setting TCP_NODELAY
somehow informed the remote end also to switch off Nagle.
是正确的,还是设置TCP_NODELAY
仅影响调用它的一端的行为?
Is that right, or does setting TCP_NODELAY
only affect the behaviour of the end that calls it?
推荐答案
TCP_NODELAY
仅影响在套接字上设置了此选项的主机上发送TCP段.也就是说,对等体的发送算法不受影响.
TCP_NODELAY
affect sending TCP segments only on the host that sets this option on its socket. That is, the peer's sending algorithm is not affected.
这篇关于设置TCP_NODELAY是否会影响套接字两端的行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!