In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge points about the difference between TCP and UDP in php. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
Differences in use
1. TCP is connection-oriented, while UDP is connectionless.
That is, there is no need to establish a connection before sending data.
TCP provides reliable service. In other words, the data transmitted through the TCP connection is error-free, not lost, not repeated, and arrives in sequence. UDP makes every effort to deliver, that is, reliable delivery without warranty
TCP is oriented towards byte stream. In fact, TCP regards data as a series of unstructured byte streams; UDP is message oriented.
UDP has no congestion control, so network congestion will not slow down the transmission rate of the source host (useful for real-time applications, such as IP phones, real-time video conferencing, etc.)
Each TCP connection can only be point-to-point, and UDP supports one-to-one, one-to-many, many-to-one and many-to-many interactive communication.
The overhead of TCP header is 20 bytes, while that of UDP is small, only 8 bytes.
TCP's logical communication channel is a full-duplex reliable channel, while UDP is an unreliable channel.
Different application scenarios
2. TCP is used in situations where it is necessary to achieve reliable transmission at the transport layer. UDP is mainly used for those high-speed transmission and real-time requirements of communications or broadcast communications.
Give an example of a call over an IP phone. If TCP is used, data will be retransmitted if it is lost during transmission, resulting in the inability to transmit the caller's voice smoothly. With UDP, it will not retransmit, so there will be no significant delay in the arrival of sound, even if part of the data is lost, it will only affect a small part of the call.
These are all the contents of this article entitled "what's the difference between TCP and UDP in php". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.