0:01
Whenever a computer wants to communicate with another computer,
0:04
the communication between those two computers
0:07
needs to be good and reliable, so it can guarantee that the data is received correctly.
0:14
For example, when you want to view a web page, or download a file, or look at an email,
0:19
you'd expect to view the web page intact and in order, with nothing missing.
0:25
Or if you're downloading a file, you would want the entire file and not just a part of the file,
0:31
because if data is missing or out of order, then it wouldn't be of any benefit to you.
0:37
So this is where TCP comes in.
0:40
TCP stands for Transmission Control Protocol and this is one of the main protocols used in a
0:49
and TCP is what is used to guarantee that all the data is received and in order,
0:56
because without TCP, then some of the data could be missing or out of order,
1:02
because if you view a web page without TCP, your web page could be all messed up.
1:08
The images could be missing or the text could be backwards and out of order.
1:14
Or if you download a file,
1:15
Then you might not get the entire file, or you could get the file out of order, which would render the file useless.
1:24
So again, this is where TCP comes in.
1:28
Now TCP is a connection-oriented protocol, which basically means that it must first acknowledge a session
1:36
between the two computers that are communicating.
1:39
So the two computers verify a connection before any communication takes place.
1:45
And it does this by using a three-way handshake.
1:49
So the first step is that a computer will send a message called a SYN.
1:56
Then the receiving computer will send back an acknowledgement message
2:00
telling the sender that it has received the message, and then finally the sender computer sends another
2:07
acknowledgment message back to the receiver.
2:11
And then once this has taken place data can be delivered.
2:16
Another important thing to remember about TCP, is that it guarantees the delivery of the data.
2:23
So if a data packet goes astray and doesn't arrive, then TCP will resend it.
2:42
Now UDP is very similar to TCP.
2:45
UDP is also for sending and receiving data.
2:50
But the main difference is that UDP is connection-less.
2:53
Which means that it does not
2:56
establish a session and it does not guarantee data delivery.
3:01
So when a computer sends their data,
3:03
it doesn't really care if the data is received at the other end,
3:08
and that's why UDP is known as the "fire-and-forget" protocol,
3:12
because it sends data, and it doesn't really care what happens to it as this demonstration will show.
3:19
Another point to remember is because of the less overhead that's involved of not guaranteeing data delivery,
3:27
UDP is faster than TCP.
3:33
So thank you for watching this video on a comparison between TCP and UDP.
3:38
Please subscribe, and I'll see you in the next video.