• 关闭写后,发送是不行了,但是接收还可以


    关闭写后,发送是不行了,但是接收还可以
    C:Python27python.exe C:/Users/TLCB/PycharmProjects/untitled2/http/t5.py
    ('192.168.137.1', 64090)
    ('192.168.137.2', 8080)
    ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__getslice__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__unicode__', '__weakref__', 'args', 'errno', 'filename', 'message', 'strerror']
    2
    0
    1
    response:2121212121
    Traceback (most recent call last):
      File "C:/Users/TLCB/PycharmProjects/untitled2/http/t5.py", line 19, in <module>
        s.send('xxxx')
    socket.error: [Errno 10058] 
    
    Process finished with exit code 1
    
    
    node1:/root#tcpdump -i eth1 '((tcp) and ( host 192.168.137.1) and (port 8080))'
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
    
    
    
    07:29:16.559843 IP 192.168.137.1.64119 > node1.webcache: Flags [S], seq 1035122306, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
    07:29:16.559874 IP node1.webcache > 192.168.137.1.64119: Flags [S.], seq 1476814773, ack 1035122307, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 6], length 0
    07:29:16.559987 IP 192.168.137.1.64119 > node1.webcache: Flags [.], ack 1, win 16425, length 0
    
    以上3次握手
    
    07:29:26.632508 IP 192.168.137.1.64119 > node1.webcache: Flags [P.], seq 1:11, ack 1, win 16425, length 10
    07:29:26.632544 IP node1.webcache > 192.168.137.1.64119: Flags [.], ack 11, win 229, length 0
    07:29:26.641932 IP node1.webcache > 192.168.137.1.64119: Flags [P.], seq 1:20, ack 11, win 229, length 19
    07:29:26.866467 IP node1.webcache > 192.168.137.1.64119: Flags [P.], seq 1:20, ack 11, win 229, length 19
    07:29:26.866770 IP 192.168.137.1.64119 > node1.webcache: Flags [.], ack 20, win 16420, length 0
    07:29:26.866794 IP 192.168.137.1.64119 > node1.webcache: Flags [.], ack 20, win 16420, options [nop,nop,sack 1 {1:20}], length 0
    
    
    以上发送数据
    
    07:29:36.547502 IP 192.168.137.1.64119 > node1.webcache: Flags [F.], seq 11, ack 20, win 16420, length 0
    07:29:36.547743 IP node1.webcache > 192.168.137.1.64119: Flags [F.], seq 20, ack 12, win 229, length 0
    07:29:36.548199 IP 192.168.137.1.64119 > node1.webcache: Flags [.], ack 21, win 16420, length 0
    
    
    以上192.168.137.1 发送fin半关闭
    
  • 相关阅读:
    iOS9--适配系列教程(原文/译文)
    电梯调度设计思路及算法
    10大高频率单词筛选
    html知识点总结
    关于博客
    Java构造器内部的多态方法
    Java初学者必学的六大Java语言要点
    Java中的length字段和length()方法
    Java学习有方法有捷径
    Java 分隔符函数split的使用注意事项
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348548.html
Copyright © 2020-2023  润新知