TCP_CORK
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


阅读更多
个人分类: c linux
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

TCP_CORK

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭