Thursday, December 12, 2013

Difference between UDP and TCP

UDP = User Datagram Protocol, a connectionless protocol that, like TCP, runs on top of IP networks. Unlike TCP/IP, UDP/IP provides very few error recovery services, offering instead a direct way to send and receive datagrams over an IP network. It's used primarily for broadcasting messages over a network.

Connectionless means a host can send a message without establishing a connection with the recipient. That is, the host simply puts the message onto the network with the destination address and hopes that it arrives. Examples of connectionless protocols include Ethernet, IPX, and UDP.

In contrast, connection-oriented protocols, such as TCP, require a channel to be established between the sender and receiver before any messages are transmitted... streams of data are exchanged...
TCP guarantees delivery of data and also guarantees that packets will be delivered in the same order in which they were sent.

No comments: