Write two command-line sockets programs ndash a client and


Write two command-line sockets programs – a client and a server – as follows. Define a Who-Am-I message as a UDP datagram containing the ASCII string “WHO AM I”. Define a You-Are message as a UDP datagram containing the ASCII string “YOU ARE X AT Y” where X is the hostname string of the client host sending the Who-Am-I message and Y is the port number of the client host sending the WhoAm-I message. Write a client program to send a Who-Am-I message to a server and wait for a reply YouAre message from the server – on receiving the reply You-Are message the client program should print the message to the console and exit. The client program should take the IP address of the destination server from the command line (that is, as a command line argument). Write a server program that waits for a Who-Am-I message from a client and then returns to the client an You-Are message containing its host name and port number. The server program should not automatically terminate. If you modify existing code to meet the requirements of this assignment, be sure to carefully and clearly denote which code is yours and which is “old”. Be sure to consult the class C Style Guidelines for keeping your code style compliant. You are to submit two things: 1) A screenshot of execution and 2) the source code for the client and server programs.

Request for Solution File

Ask an Expert for Answer!!
Computer Network Security: Write two command-line sockets programs ndash a client and
Reference No:- TGS0812400

Expected delivery within 24 Hours