Question
Using Java GUI program Assignment Tasks You are asked to develop a Server program running on one computer, and a Client program running on another
Using Java GUI program
Assignment Tasks
You are asked to develop a Server program running on one computer, and a Client program running on another computer. (When you test your server and client programs on one computer, you may use Loopback IP Address 127.0.0.1, with which any packets sent out from this machine will immediately loop back to itself.) The Server will accept input from keyboard for system initialization, selection of menu items, human command and instructions, etc. It will also display information on the monitor, periodically send commands to the Client, and receive feedback from the Client. After receiving a command from the Server, the Client will send feedback to the Server, and displays some information of your interest.
Assignment tasks are described below:
(1) When the Server is started, it initializes the settings of the servers IP addresses, port Server Keyboard Monitor Client TCP/IP Port No.: 3247 Monitor Keyboard 3 number, and the clients IP address, etc., through command window arguments, e.g., header file, arguments to main(), keyboard input, or input from a configuration file which is a pure text file.
(2) Every 3 seconds, the Server sends the Client a command to ask for data, e.g., through a single letter R or r (request). (Timing control is required here. Using our examples in the lecture materials if you like.)
(3) After receiving the command from the Server, the Client sends back to the Server an ACK consisting of the clients time (hh:mm:ss:???) and a random integer number between 0 and 100 with a uniform distribution. The Client may also display some useful information on its monitor. (Use a random generator to generate such random numbers. For example, rand()%101 and use srand(time(NULL)) to get a seed for rand(), where time() function is defined in header file time.h).
(4) The Server gets the feedback from the Client, and display the result.
(5) The Server reads keyboard input of various command and instructions. An obvious command is to terminate the Server program, e.g., using a single letter E or e (exit). When the Sever is to be terminated, the Server should also notify the Client of the Servers termination so that the Client also terminates properly.
Monitor Monitor TCP/IP Server Client Port No.: 3247 Keyboard KeyboardStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started