TCP is connection oriented protocol,mean it ensure that a packet is delivered and also set up a connection before sending data to destination source and destination exchange several control signal before sending data.If a packet is lost,TCP resend it. UDP does not establish any communication before sending data.It sends data and forget it.If a packet is lost,application using UDP cannot resend it.A example of UDP is voip,if a packet is lost,a part of conversation is also lost and can not be resend
Both are transport layer protocols but TCP is reliable, connection oriented and acknowledgements to sender. UDP is just opposite not reliable as sender receives no ack, connections are not established before transmission. UDP just send the data and assumes it will reach properly.
UDP
UDP and TCP both are transport layer protocols. UDP is connection less and TCP is connection oriented. UDP is preferred over TCP when large amount data is to be sent like on skype or video conferencing .
TCP
TCP and UDP are two different layer 4 protocols. TCP reliably sends data with acknowledgments and UDP sends data without checking if the destination received it. Skype uses UDP while email uses TCP.
In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.
UDP is alot faster than TCP. So if its realtime obviously it has to be fast, thus UDP. The only problem is UDP isn't as reliable or as secure as TCP. But it does have the speed advantage.
It depends on whether you want speed (UDP) or reliability (TCP).
Transport layer TCP/IP Protocols are TCP and UDP
the main difference between UDP and TCP is that UDP is not a reliable protocol.
transport
UDP does not require as much resources as TCP but in the same time, it does not insure delivery of packets.
Port No. for Tranmission Control Protocal (TCP) is 6 Port No. for User Datagram Protocol (UDP) is 17