answersLogoWhite

0

Difference between TCP and UDPThere are two types of internet protocol (IP) traffic, and both have very different uses.

  1. TCP(Transmission Control Protocol). TCP is a connection-oriented protocol, a connection can be made from client to server, and from then on any data can be sent along that connection.
    • Reliable - when you send a message along a TCP socket, you know it will get there unless the connection fails completely. If it gets lost along the way, the server will re-request the lost part. This means complete integrity, things don't get corrupted.
    • Ordered - if you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order.
    • Heavyweight - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequence parts have to be put back together, so requires a bit of work to piece together.
  2. UDP(User Datagram Protocol). A simpler message-based connectionless protocol. With UDP you send messages(packets) across the network in chunks.
    • Unreliable - When you send a message, you don't know if it'll get there, it could get lost on the way.
    • Not ordered - If you send two messages out, you don't know what order they'll arrive in.
    • Lightweight - No ordering of messages, no tracking connections, etc. It's just fire and forget! This means it's a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets.
User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
More answers

I have heard different things about udp and don't understand exactly what

the real thing is. A couple things i have heard is that udp is faster, tcp

is more dependable.

I have created a simple tcpClient and a server in cSharp that allows me to

talk in the client and have a text string sent to the server. The server

evaluates the string and then replies with a message accordingly. The

connection remains open the whole time.

I found an example on the net with a udpClient and Server.

I'm working on building an mmorpg and I have figured out what data I need to

send byte per byte in order to keep stuff syncronized with the server. From

what I have heard udp is the best to use.

Can anyone tell me what benefits or drawbacks might be associated with using

one over the other and give me an idea of why? I have heard different things about udp and don't understand exactly what

the real thing is. A couple things i have heard is that udp is faster, tcp

is more dependable.

I have created a simple tcpClient and a server in cSharp that allows me to

talk in the client and have a text string sent to the server. The server

evaluates the string and then replies with a message accordingly. The

connection remains open the whole time.

I found an example on the net with a udpClient and Server.

I'm working on building an mmorpg and I have figured out what data I need to

send byte per byte in order to keep stuff syncronized with the server. From

what I have heard udp is the best to use.

Can anyone tell me what benefits or drawbacks might be associated with using

one over the other and give me an idea of why?

User Avatar

Wiki User

17y ago
User Avatar

Simple answer is TCP is Connection-Oriented and UDP is Connectionless. More information can be found when researched.

TCP - Connection-Oriented means it keep track of the data transmitted & received to make sure all information went through. Examples: Surfing websites, downloading files

UDP - Connectionless means it does not check to make sure all data is received. A few data packet loss would not really affect the program. Examples: Streaming live videos, online video gaming, VOIP/Voice calls.

User Avatar

Wiki User

12y ago
User Avatar

TCP is a connection protocol and UDP is a connection-less protocol.

TCP are used when you want to control the quality to the receiver.

I.e. you send the package and the receiver acknowledge that the package is received ok. FTP and HTTP are two examples.

With UDP you just send the data to whoever requests it, it can even be to multiple users.

For example, video streaming.

UDP is much faster then TCP.

User Avatar

Wiki User

13y ago
User Avatar

Both the protocols differ in the way they carry out the action of communicating. A TCP protocol establishes a two way connection between a pair of computers , while the UDP protocol is one-way message sender. The common analogy is that TCP is like making a phone call and carrying on a two-way communication, while UDP is like mailing a letter.

User Avatar

Wiki User

10y ago
User Avatar

Both the protocols differ in the way they carry out communication , also both are network layer protocols . A TCP protocol establishes a two way connection between a pair of computers , while the UDP protocol is one-way message sender. That is in TCP, Acknowledgement is also sent after receiving the message while there is no such acknowledgement sent after receiving the message in UDP.

User Avatar

Wiki User

10y ago
User Avatar

You use UDP when the major concern is speed; TCP is used when the major concern is reliability.

User Avatar

Wiki User

14y ago
User Avatar

their names

User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: What are difference between tcp and UDP?
Write your answer...
Submit
Still have questions?
magnify glass
imp