TCP_CORK

原创 2016年06月02日 00:45:22
TCP_CORK:
setsockopt(fd, IPPROTO_TCP, TCP_CORK, (char *) &enable, sizeof(enable))


没有set前:
00:17:26.951501 IP 192.168.1.108.50403 > 192.168.1.109.http: Flags [S], seq 978655012, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
00:17:26.951553 IP 192.168.1.109.http > 192.168.1.108.50403: Flags [S.], seq 3894567125, ack 978655013, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
00:17:26.951783 IP 192.168.1.108.50403 > 192.168.1.109.http: Flags [.], ack 1, win 4380, length 0
00:17:26.952878 IP 192.168.1.108.50403 > 192.168.1.109.http: Flags [P.], seq 1:78, ack 1, win 4380, length 77
00:17:26.952899 IP 192.168.1.109.http > 192.168.1.108.50403: Flags [.], ack 78, win 229, length 0
00:17:27.695260 IP 192.168.1.109.http > 192.168.1.108.50403: Flags [P.], seq 1:332, ack 78, win 229, length 331
00:17:27.695664 IP 192.168.1.109.http > 192.168.1.108.50403: Flags [F.], seq 332, ack 78, win 229, length 0
00:17:27.696322 IP 192.168.1.108.50403 > 192.168.1.109.http: Flags [.], ack 333, win 4297, length 0
00:17:27.696934 IP 192.168.1.108.50403 > 192.168.1.109.http: Flags [F.], seq 78, ack 333, win 4297, length 0
00:17:27.696966 IP 192.168.1.109.http > 192.168.1.108.50403: Flags [.], ack 79, win 229, length 0


设置之后:
00:40:10.365009 IP 192.168.1.108.50459 > 192.168.1.109.http: Flags [S], seq 2391285363, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
00:40:10.365066 IP 192.168.1.109.http > 192.168.1.108.50459: Flags [S.], seq 1750167226, ack 2391285364, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
00:40:10.365424 IP 192.168.1.108.50459 > 192.168.1.109.http: Flags [.], ack 1, win 4380, length 0
00:40:10.365492 IP 192.168.1.108.50459 > 192.168.1.109.http: Flags [P.], seq 1:78, ack 1, win 4380, length 77
00:40:10.365508 IP 192.168.1.109.http > 192.168.1.108.50459: Flags [.], ack 78, win 229, length 0
00:40:10.540881 IP 192.168.1.109.http > 192.168.1.108.50459: Flags [FP.], seq 1:332, ack 78, win 229, length 331
00:40:10.541426 IP 192.168.1.108.50459 > 192.168.1.109.http: Flags [.], ack 333, win 4297, length 0
00:40:10.541975 IP 192.168.1.108.50459 > 192.168.1.109.http: Flags [F.], seq 78, ack 333, win 4297, length 0
00:40:10.541986 IP 192.168.1.109.http > 192.168.1.108.50459: Flags [.], ack 79, win 229, length 0


版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

TCP_CORK: More than you ever wanted to know

原文地址: http://baus.net/on-tcp_cork/ TCP_CORK: More than you ever wanted to know April 6, 2005...

56-套接字选项(TCP_CORK)

Nagle 算法尽量减少小分组出现在网络上,而 TCP_CORK 是完全避免小分组出现在网络上。该选项是在 Linux 2.2 才引入的。cork 这个单词,意为“塞子”,我们把 TCP 发送缓冲区想...

TCP_NODELAY和TCP_CORK

TCP_NODELAY和TCP_CORK都是禁用Nagle算法,只不过NODELAY完全关闭而TCP_CORK完全由自己决定 发送时机。Linux文档上说两者不要同时设置。

Nagle算法TCP_NODELAY和TCP_CORK CP_NODELAY

坐公交车,最近在看《网络游戏Server编程》,里面提到了Nagle算法和socket的TCP_NODELAY选项,不是很了解,所以百度了一下,查到以下资料,并收藏。   下面摘自:http://...

关于TCP_NODELAY和TCP_CORK选项

关于TCP_NODELAY和TCP_CORK选项   这两个选项都对网络连接的行为具有重要的作用。许多UNIX系统都实现了TCP_NODELAY选项,但是,TCP_CORK则是Linux系...

TCP_NODELAY和TCP_CORK

Nagle算法 TCP_NODELAY和TCP_CORK Nagle算法 根据创建者John Nagle命名。该算法用于对缓冲区内的一定数量的消息进行自动连接。该处理过程(称为Nagling),通...

再次谈谈TCP的Nagle算法与TCP_CORK选项

出处:http://blog.csdn.net/dog250/article/details/21303679 事件回放 使用OpenVPN传输虚拟桌面流量,终端上有明显逐帧刷屏现象,网络...

TCP_NODELAY和TCP_CORK

先上代码: int flag = 1; int result = setsockopt(sock, /* socket affected */ IPPROTO_TCP, /* set optio...

TCP_NODELAY 和 TCP_CORK

TCP_NODELAY 和 TCP_CORK  这两个选项都对网络连接的行为具有重要的作用。许多UNIX系统都实现了TCP_NODELAY选项,但是,TCP_CORK则是Linux系统所独有的而且相...

Nagle算法与TCP_NODELAY和TCP_CORK

原文地址:http://blog.csdn.net/shellching/article/details/5592511 下面摘自:http://hi.baidu.com/z...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)