Python-tcp Sticky Bag

Source: Internet
Author: User

TCP has sticky packets, UDP non-sticky packets, will exceed buffer_size data discarded. UDP is only responsible for sending data, regardless of whether the server is open (not dependent on the server), the same operation without error, so unreliable.

TCP stream-oriented, UDP-oriented message packets, each UDP segment is a message. The application must extract data in the message unit and cannot fetch any byte-sized data at a time.

UDP does not need to be connected, so it can provide efficient service.

TCP is based on data flow (do not know the starting position and end position), so send and receive messages can not be empty, you need to add a blank message processing mechanism of C/s, to prevent the card master, and UDP is based on the datagram, even if the input is a space, it is not an empty message, because the UDP protocol encapsulates the message header

Two cases of sticky bag:

1) Packet small: flow-oriented communication is not border protected. TCP will synthesize a data with a small amount of time interval and small data, and transmit it as a package so that the client can only receive one package.

2) Packet large: The receiving side receives the fixed data size less than the packet length from the cache pool, leaving the remaining data in the cache pool, waiting for the second time to receive the data sent by the sending side, resulting in sticky packets.

Python-tcp Sticky Bag

Related Article

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.