Does setting TCP_NODELAY affect the behaviour of both ends of the socket?

南楼画角 提交于 2020-01-22 19:33:17

问题


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.

Is that right, or does setting TCP_NODELAY only affect the behaviour of the end that calls it?


回答1:


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.



来源:https://stackoverflow.com/questions/8226512/does-setting-tcp-nodelay-affect-the-behaviour-of-both-ends-of-the-socket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!