在Linux中禁用Nagle算法 [英] Disabling Nagle's Algorithm in linux
本文介绍了在Linux中禁用Nagle算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在网上找不到任何可以从Linux中的命令行禁用Nagle算法的东西. Solaris确实具有从命令行启用/禁用它的机制.
I could not find anything on the net to disable Nagle's Algorithm from the command line in Linux. Solaris does have a mechanism to enable/disable it from the command line.
请告知我在Linux上是否有任何方法.
Please let me know if there is any way of doing it on Linux.
推荐答案
使用setsockopt()
设置TCP_NODELAY标志,这是每个套接字完成的,而不是从命令行完成的.我知道没有在全球范围内执行此操作的方法,尽管在/proc/sys/net下有一个文件可以执行此操作也不会令我感到惊讶...
It's done per socket, not from the command line, using setsockopt()
to set the TCP_NODELAY flag. I am aware of no method for doing this globally, though it wouldn't surprise me if there was a file under /proc/sys/net to do this...
这篇关于在Linux中禁用Nagle算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文