zoukankan      html  css  js  c++  java
  • TCP协议中的Push标志位

    原:

    The push flag tells the receiving end of the tcp connection to "push" all buffered data to the receiving application. It basically says "done for now".

    译:

    Push标志位通知TCP连接的接收方, 让它把所有缓存的数据给"push"到接收端的应用程序里去. 这个flag的意思基本上就是"传好了, 现在, 让你的应用程序先处理一下我传来的这些数据吧".

    更多:

    The Push flag, like the Urgent flag, exists to ensure that the data is given the priority (that it deserves) and is processed at the sending or receiving end. This particular flag is used quite frequently at the beginning and end of a data transfer, affecting the way the data is handled at both ends.

    When a host sends its data, it is temporarily queued in the TCP buffer, a special area in the memory, until the segment has reached a certain size and is then sent to the receiver. This design guarantees that the data transfer is as efficient as possible, without waisting time and bandwidth by creating multiple segments, but combining them into one or more larger ones.

     

    When the segment arrives at the receiving end, it is placed in the TCP incoming buffer before it is passed onto the application layer. The data queued in the incoming buffer will remain there until the other segments arrive and, once this is complete, the data is passed to the application layer that's waiting for it.

    While this procedure works well in most cases, there are a lot of instances where this 'queueing' of data is undesirable because any delay during queuing can cause problems to the waiting application. A simple example would be a TCP stream, e.g real player, where data must be sent and processed (by the receiver) immediately to ensure a smooth stream without any cut offs.

     

    A final point to mention here is that the Push flag is usually set on the last segment of a file to prevent buffer deadlocks. It is also seen when used to send HTTP or other types of requests through a proxy - ensuring the request is handled appropriately and effectively.

    资料来源:

    The TCP Datagram

    http://www.daemon.org/tcp.html 

    TCP Analysis - Section 4:TCP Flag Options

    http://www.firewall.cx/tcp-analysis-section-4.php

  • 相关阅读:
    IDEA 实用功能Auto Import:自动优化导包(自动删除、导入包)
    idea 设置主题
    MySql where 后面使用函数导致索引失效问题
    IDEA报错,注解标红,提示Cannot resolve symbol xxx
    分批更新list
    java.lang.ArithmeticException: Rounding necessary
    Java selenium通过JS直接进行赋值给日期框
    postman接口测试之获取响应数据
    Jenkins集成allure测试报告
    Jenkins配置邮件通知
  • 原文地址:https://www.cnblogs.com/awpatp/p/1841898.html
Copyright © 2011-2022 走看看