I created a class for the server with the declaration:
class myServer(socketserver.BaseRequestHandler): def handle(self): pass
And he began with:
someServer = socketserver.UDPServer((HOST, PORT), myServer) someServer.serve_forever()
My question is: how can I make the server shut down? I saw that it has a base class (base class) called BaseServer with a shutdown method. It can be called on someServer using someServer.shutdown() , but this is from outside the server itself.
source share