Question
Modify the code in the day/time server application (in timeserver.py) so that the user on the server side can shut the server down. That user
Modify the code in the day/time server application (in timeserver.py) so that the user on the server side can shut the server down. That user should be able to press the return or enter key at the terminal to do this. After the enter key is pressed, the message Server shutting down. should be printed to the terminal and the server should shut down. The timeserver.py logic will need to be converted into the class TimeServer. In order to shut down the server independently, the server must be running on a separate thread. Create the logic to run the server until the signal is given to shut the server down. The TimeServer class should implement the following methods: __init__ run quit main The main method running on the server is used to interface with the server and shut down its processes. This lab follows a client server model. In order for the client program to connect to the server the following steps must be taken: Enter python3 timeserver.py into the first Terminal. Open a new terminal tab by clicking the '+' at the top of the terminal pane. Enter python3 timeclient.py into the second Terminal. The client code will now be able to establish a connection to the server.
Step 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