Question: This program should connect to the adapter and wait to receive address, once received, it should send the address supplied by user (either through scanf

This program should connect to the adapter and wait to receive "address", once received, it should send the address supplied by user (either through scanf or as argument). The it should wait for another input which should be "port". It should also send the port information and again wait for data. The next data should either be "ok" or "error". If it is error, it should relay this information to the user and quit. If it is ok, it should go into send and receive mode. In this mode the program should ask data from the user and send it to the adapter, and receive data from adapter and display it on screen. This should continue until user presses CTRL+C in which point the program should terminate gracefully. This program should connect to the adapter and wait to receive "address", once received, it should send the address supplied by user (either through scanf or as argument). The it should wait for another input which should be "port". It should also send the port information and again wait for data. The next data should either be "ok" or "error". If it is error, it should relay this information to the user and quit. If it is ok, it should go into send and receive mode. In this mode the program should ask data from the user and send it to the adapter, and receive data from adapter and display it on screen. This should continue until user presses CTRL+C in which point the program should terminate gracefully
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
