Creating a simple ChatApp using User Datagram Protocol(UDP) in Python

  1. User Datagram Protocol (UDP)

So how are these two protocols different?

UDP

User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of Internet Protocol suite, referred as UDP/IP suite. Unlike TCP, it is unreliable and connection less protocol. So, there is no need to establish connection prior to data transfer. Although it is insecure it is very fast and provides very low latency.

TCP

TCP is used for organizing data in a way that ensures the secure transmission between the server and client. It guarantees the integrity of data sent over the network, regardless of the amount. For this reason, it is used to transmit data from other higher-level protocols that require all transmitted data to arrive.

TCP vs UDP

TCP is a connection oriented protocol. UDP is a connection less protocol. As TCP provides error checking support and also guarantees delivery of data to the destination router this make it more reliable as compared to UDP. … On other hand retransmission of packets is not possible in UDP.

Let’s view the connections

For the practical I would be using two systems. One is Windows 10 and the other is RHEL8.

Conclusion

The similar task can be performed using TCP protocol in a much easier way but the point is not of doing things easy. I configured it using UDP because it presents more challenging task and helps to get the concept cleared in a much more effective way.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store