TCP Push bit PSH (Push)

Source: Internet
Author: User
Tags bit set

TCP Push bit PSH (Push) PSH is a flag in the TCP Header. The sender can set this flag when sending data. when two applications perform interactive communication, sometimes the application process at one end needs to receive the response immediately after a command is entered. in this case, TCP can use push operations. at this time, the sender TCP sets push bit PSH to 1 and immediately creates a packet segment for sending. the receiving TCP receives the packet segment of the push bit set to 1, and delivers it to the receiving application process as soon as possible (that is, "Push Forward"), instead of waiting until the entire buffer is filled up and then interacts with the application. PSH bit is also called urgent bit. although the application can choose to push the operation, the push operation is often not used by people. In fact, the current TCP protocol stack can basically handle this problem on its own, rather than being handed over to the application layer for processing. the sender uses this flag to notify the receiver to submit all received data to the receiving process. The data here includes the data transmitted with PUSH and other data received by the receiver TCP for the receiving process. in the original TCP specification, the sending application is allowed to set the tcp psh id. after the sending application sets the tcp psh identifier, TCP should send the data in the sending cache without waiting for additional data. After receiving the PSH identifier, the Receiver, you should submit the received data to the application without waiting for other possible data. most TCP implementations originating from Berkeley (BSD) can automatically set the psh id when the sending cache is cleared (all data in the sending cache is sent. because the application will be sent over TCP when writing data to TCP (unless the receiving end window is 0 or other reasons cannot be sent ). if the data to be sent is cleared, the protocol stack automatically sets the PSH flag for the package. because TCP originating from BSD never submits the received data to the application at a delay, the receiving end ignores the received PUSH identifier. the PSH bit is used to notify the recipient of the packets to be received together with the data in the TCP receiving cache and submit it to the application process for processing. generally, the message appears in the TCP packet that the sender encapsulates the last application field. For TCP interactive applications, the PSH position is 1 as long as the TCP packet with the application field is encapsulated. of course, application developers can set PSH position 1 for all TCP packets that encapsulate application fields in an application function module or in an application operation as needed, in order to improve the processing efficiency of the interaction, this should be feasible theoretically.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.