Socket Programming using UDP in Python

Socket Programming using UDP in Python

What is Socket Programming?

Socket programming is a way of connecting two nodes a network to communicate with each other. One socket (mode) listens on a particular port an IP, while other socket reaches out to the other to form a connection, server forms the listens to socket while client reaches out to the server.

UDP:
UDP or user datagram protocol is connectionless protocol/ which is suitable for applications that require efficient communication that doesn't have to carry about packet loss. For gaming applications, this tends to the perfect protocol due to the lower overhead in current as opposed to TCP.

Steps to implement UDP using Socket programming:
  • import socket library
  • create a socket object
  • reserve a port on computer and bind to port.
  • put the socket into listening mode.
  • establish a connection with the client.
  • start server (after importing and creating socket )
  • open the terminal and connect to the server with the created report.
  • connect to the server.
  • receive data from the server.




Comments

Popular posts from this blog

Configuring Open Shortest Path First Protocol:

Introduction to Cisco Packet Tracer

Configuring Static NAT in Cisco Packet Tracer