Quote:
Originally Posted by Tom Bottiglieri
Wouldn't that be a better reason to use UDP? If there's less of a chance of dropped packets, why bother with the added overhead of TCP?
|
Because the "overhead" of TCP is barely noticeable (the information density is ~94%, with ~6% left for headers) and really only comes into play when you have a noisy connection, where packets would be missed and therefore resent, and during the initiation of a connection, which you do once. Dropped packets are a non-issue, as well, and wouldn't affect TCP's performance. It happens, but very rarely (comparatively) and in everything I've experienced it's rarely anything but hardware problem.
Besides apparently not being able to use UDP, TCP is generally easier to use, as a stream, than to have to fit everything into a fixed datagram and then unpack it (this is more of a personal choice, though). The only benefit of UDP will be if you are sending time sensitive information, otherwise I see no reason why it would be chosen to use.
It doesn't matter either way. You can do some time tests with TCP vs UDP, if you want.