Question: Write the program in python Programming Assignment 1: UDP Echo Client and Server Example of the client trace output (server responds): Sending data to 127.0.0.1,
Write the program in python

Programming Assignment 1: UDP Echo Client and Server Example of the client trace output (server responds): Sending data to 127.0.0.1, 12000: XXXxxxxxxx (10 characters) Reaeive data from 127.0.0.1, 12000 XXxxxxxxXX Using UDP sockets, you will write a client and server program that enables the client to send a string of some specified length to the server over the network, and the server simply echoes back that string back to the client. Example of the client trace output (server does not respond): ending data Message tined out Sending data to.1, 12000i XXxxxxxxxx (10 charaaterB) Message t Sending data tg 19i, 12000: xxxxxxxxxx (10 characters) Message tined out 12000: XXXXxxxxxx The client program should take the following input parameters: ined out IP address of server UDP port of server Length of string to be sent Example of server trace output: The server is ready to receive on port: 12000 The client program will read in the above input parameters, initialize a string of the specified length, and send the message using the UDP socket API to the server running at the specified IP address and port. If the client does not receive a message back from the server within a certain amount of time (one second), the client should retry up to a maximum number of trles (3) before terminating. The program output should print out trace information when data is sent and received, and account for error conditions. Client trace output must include: Receive data from client 127.0.0.1, 56777: XXXXXXXXXX Sending data to client 127.0.0.1, 56777: XXXXXXXXXX References: Python A message when data is sent to the server indicating destination IP address and port and length plus content of the data sent A message when data is received from the server indicating source IP address and port and contents of the data received An error message when any error occurs such as when a time-out occurs because the server is not running . o https://docs.python.org/3/library/socket.html o https://docs.python.org/3/library/struct.html . o https://linux.die.net/man/7/socket o https://linux.die.net/man/3/byteorder . Java o https:/docs.oracle.com/javase/tutorialetworking/datagrams/index.html The server program should execute at a fixed port number, and be prepared to read in data up to a fixed maximum length (100 bytes). The server will wait in an infinite loop to receive data from a client, and then send the received data back to the client without modification. Server trace output must include: A message when data is received from the client indicating source IP address and port and contents of the data received . Test Cases (both test cases must be demonstrated for full credit) 1. Test both client and server running on the same host, such as your computer (this should llustrate the cllent sending a single message and the server response) Test client behavior when server is not running (this should illustrate the client sending 3 messages and timing out after each one) 2. The string may contain any value. Initializing it to a specified value will aid debugging The socket API supports a timeout faclity. See documentation on socket library relevant to gramming language you are using pro Input parameters may be read in to override these defaults, but this is not necessary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
