docs: def main(self):
          """
          Runs the mainloop. Blocks. Can be halted with over a network, or by 
          with either stop_server() or terminate_server().
          """
          try:
              self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
              self.sock.bind((self.host, self.port))
              self.sock.listen(5)
              self.sock.settimeout(END_RESP)
              
              self.stop = self.terminate = False
              
              while not (self.stop or self.terminate):
                  try:
                      conn, addr = self.sock.accept()
                  except socket.error:
                      # We have timed out, hurry and get back to accept those 
                      # connections!
                      pass
                  except KeyboardInterrupt:
                      # We've been told to quit, do so!
                      self.terminate_server()
                  else:
                      threaded(self._handler, (conn,))
              
              while not self.terminate:
                  time.sleep(END_RESP)
              # We are done, the finally will close the socket.
          finally:
              self.sock.close()