What is TCP? What is UDP? What are Their Differences?

TCP Vs UDP


What is UDP?

UDP is the abbreviation for "User Datagram Protocol" and if we translate this into Turkish, it can be translated as "Kullanıcı Datagram Protokolü".

UDP is a protocol that enables data transfer between computers.

Because there is no authentication in data sent via UDP, the data is transferred very quickly but not as securely as with TCP. What I mean by secure here is that the data may be sent incomplete or with errors.

UDP is used where data accuracy is not important and needs to be sent quickly. For example, in online games we play, character positions are sent via UDP. When it is sent 100 times per second, a few data packets mistakenly sent can be ignored.

What is TCP?

TCP is the abbreviation for "Transmission Control Protocol" and if we translate this into Turkish, it can be translated as "İletim Denetimi Protokolü".

TCP ensures the lossless and controlled transfer of data between computers.

The most important feature of TCP is that it performs authentication, making sure that data to be sent or received is transferred without loss.

Protocols we use frequently in everyday life such as HTTP, HTTPS, POP3, SSH, SMTP, Telnet, and FTP are essentially implemented with TCP.

TCP was first introduced in 1974 in a paper called "A Protocol for Packet Network Intercommunication".

TCP is used where more reliable and accurate data transmission is required.

How Does TCP Work?

We can divide how TCP works into three stages.
First Stage:
A connection request is sent to the address where the data will be sent.

Second Stage:
The connection request is approved and data transfer begins.

Third Stage:
Both sides are notified that the data transfer is complete and the connection is terminated. This stage is called the "State".

Differences Between TCP and UDP


TCPUDP
ReliabilityHighLow
SpeedLowHigh
Transmission managementPackets are sent in orderPackets are sent in stream
Error detection and correctionYesNo
Data congestion controlYesNo
AcknowledgmentYesOnly checksum