Reputation: 11137
what is the difference between UdpClient and TcpClient ? When should i use Tcp and when Udp from the point of software arhitecture ? I hope i've explained it right ..
Upvotes: 7
Views: 9102
Reputation: 31
To sum it up TCP where you do not want lost data(resend data) Real-time live streaming like video we do not want lost packets resent it is real-time so use UDP
Upvotes: 1
Reputation: 7744
TCP vs UDP comparison - Usage
TCP vs UDP comparison - Function
TCP vs UDP comparison - Acronym for
TCP vs UDP comparison - Weight
TCP vs UDP comparison - Streaming of data
TCP vs UDP comparison - Speed of transfer
TCP vs UDP comparison - Examples
TCP vs UDP comparison - Data Reliability
TCP vs UDP comparison - Connection Reliable
TCP vs UDP comparison - Ordering
TCP vs UDP comparison - Error Checking
TCP vs UDP comparison - Header Size
Short compare. Must have book.
Upvotes: 18
Reputation: 31202
Basically,
You should have a read at those links :
Upvotes: 12
Reputation: 101231
UDP and TCP are two different protocols.
Basicly, you almost always want to use TCP unless you have a very compelling reason not to.
UDP is a very basic protocol on top of the IP protocol, and only adds simple checks if the data isn't corrupt.
TCP on the other hand is much more complicated, but also much more reliable, because it guarantees that you're data arrives, arrives in the right order and things like congestion control.
Upvotes: 2