Python implementation of UDP

User Datagram Protocol is one of the oldest protocol in existence that has been used extensively in client/server applications. Based out of the principal communications protocol, called Internet Protocol (IP), UDP is an alternative for TCP which stands for Transmission Control Protocol.

Queries regarding which among the two protocol can be a better choice should be determined only after answering questions based on the context for which you are writing the code for. Since UDP is known for its unreliability, it is important that you use it right.

Without any error checking or error correction involved in data transmission UDP is often used in video chat applications because a fall in a packet or two doesn't affect final outcome. 


The following post will be focused on developing a client server application that will implement using Python.

The program can be passed arguments namely - "client" and "server" and the program acts accordingly.




When the client is started it send the server current time information and the server replies an acknowledgement saying how many bytes was received by the server. Since this program is run on the same machine and the messages are not sent via network there wont be any possible packet loss. We need to consider those aspects while writing  code for real world applications.


Popular posts from this blog

What really is a Hypertext?

Browser Rendering Phase

Crypto crypto everywhere but not a token to bet your life on