TCP is connection-oriented. You send a message to the server saying "hey I'm going to send you stuff". The server responds in acknowledgement. Then, you start sending stuff. The server acknowledges everything you send. If you don't get an acknowledgement, you resend the data. As a result, you're guaranteed either to get everything in the order it was sent or you get an error. In UDP, the sender just sends the packet and goes. It uses much less bandwidth, but the receiver may receive the data out of order or not at all.
No comments:
Post a Comment