4 ms·
Just a question...Doesn't TCP confirm the data sent, UDP doesn't and has a lower overhead, right?
by quackerhacker 13y ago
Just a question...Doesn't TCP confirm the data sent, UDP doesn't and has a lower overhead, right?
- antocv 13y agoThat is correct yes. UDP doesnt have ports either.
- glurgh 13y agoIt definitely has ports. Right there, in the packet header. http://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure http://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_s...
- astrodust 13y agoBoth UDP and TCP have ports. ICMP does not. The set of Source IP:Source Port:Target IP:Target Port is how most connections are differentiated. All four of those combine to form a unique connection identifier.
- chinpokomon 13y agoCorrect, UDP doesn't ACK, but you also don't know if the packet reached the server for the same reason. UDP is great for streaming data that may arrive out of order or where packets can be lost and it isn't critical, such as streaming video, but it is awful if you need to be sure the data got to its destination.
- quackerhacker 13y agoThank you, that's what I was thinking about UDP. I knew UDP was good for video and raw data packets. Disappointing that Webworkers, Video, and Audio streams for HTML5 still use TCP. BTW: awesome handle - south park, lol :)
- raylu 13y agoYou mean websockets? Those try to support all the legacy of HTTP proxies (which I don't understand the point of).
- quackerhacker 13y agowhoops, yeah I meant websockets (was coding a worker when I commented lol)
- granitepail 13y agoYou're generally spot on, but I figured I'd clarify a bit of terminology since it can be so confusing in our field. Generally, TCP is referred to as a "stream" based protocol because it guarantees, amongst other things, that all packets will arrive in the order in which they were sent, as you've mentioned. UDP _is_ great for "streaming" data, meaning data sent piecewise over a continuous connection (or, at least, emulated connection) because packet loss / reordering is an acceptable loss, since a minor blip is less destructive than pausing the video. In this type of setting, packets that arrive out of order (i.e. a packet that was sent earlier arrives after a packet sent after it has been received) are thrown out and the process keeps on chugging.
- chinpokomon 13y agoCorrect, UDP doesn't ACK, but you also don't know if the packet reached the server for the same reason. UDP is great for streaming data that may arrive out of order or where packets can be lost and it isn't critical, such as streaming video, but it is awful if you need to be sure the data got to its destination.