UDP is faster than TCP is correct. It not only adds less data, but less logic to the underlying network protocol drivers. TCP works with a sliding window algorithm that basically rejects packets that come out of sequence and request them to be reset. If one wanted to optimize, they could use UDP. Thus, if packets come out of order, the driver could hold onto them and order them. It provides more flexibility and thus you could re-implement TCP, but more light weight especially if you can do it on a per-protocol basis.
Another reason for UDP is streaming audio or video. If you need things to occur in real time, TCP makes sure everything is delievered. UDP is faster and in a real time video if you miss a frame, who cares. So, streaming packets and not caring if they get to the client or not is acceptable. Especially when you are not saving the data, but playing it real time (Which is what I am referring to). If your network has limitations, the video will probably play too slow anyway. If you skip a frame or two, it's not a big deal.
Main Topics
Browse All Topics





by: glassdPosted on 2003-05-16 at 02:51:33ID: 8539215
I am no expert but I believe that on a reliable network UDP is faster than TCP and adds less data to the packets. Many applications do there own checking anyway, so they use UDP.