Differences between the UDP and TCP protocols
User Datagram Protocol (UDP)
It is part of the base protocols of the Internet Protocol Suite. Programs on networked computers can send short messages sometimes called as datagrams. UDP does not guarantee any reliability( it happens datagram may arrive out of order, are duplicated, or are missing without any notice). The fact that no checking whether all packets are actually delivered is made, UDP proves to be faster and more efficient, for applications that do not need guaranteed delivery. UDP find its uses in such situations:
Time-sensitive applications. The problems due to delayed packets are avoided
It is also useful for servers that answer small queries from huge numbers of clients. UDP supports packet broadcast (conveys to all on local network) and multicasting (conveys to all subscribers).
Transmission Control Protocol (TCP)
It is often referred to as TCP/IP due to the importance of this protocol in the Internet Protocol Suite. TCP operates at a higher level, concerned only with the two end systems, (e.g. between web browser and a web server). TCP provides reliable, sequential delivery of a stream of data from one program on one computer to another program on another computer. Common uses of
TCP regroup e-mailing support and file transfer and Web applications. Among its management tasks, TCP controls message size, the rate at which messages are exchanged, and network traffic congestion. As for
IP, it handles lower-level transmissions from computer to computer as a message transferred across the Internet.
Note:
IP works by exchanging information chunks called packets. A packet is a sequence of bytes consisting of a header and a body. The header contains the packet's destination and path to be taken on the Internet and the body contains the data which is being transmitted.