Closed pilif0 closed 5 years ago
Not very sure about the self.hli, is it because they're in the same directory so we don't need to import it?
It is because the HLI is now a field of the Server object. See the Server __init__
where it gets set, and run.py
where the constructor is called with an HLI instance.
Adds server object that encapsulates the comms behaviour. This object also takes the HLI instance as a parameter (therefore it doesn't have to know how to instantiate HLI or LLI).
The object listens continually on the socket, waiting for a connection. Once a connection is established, it takes messages and responds to them as before. Once the connection is closed, the server goes back to listening on the socket. At this moment, it has to be terminated by a forced program shutdown.
Fixes #31, #32