Example #1
0
def run(portId):
    try:
        server_address = ('localhost', portId)
        server = HTTPServer(server_address, requesthandlerclass)
        server.serve_forever()
    except KeyboardInterrupt:
        print("you interupted the code")
        server.close_request()
Example #2
0
    def close_request(self, request):

        if (request is None):
            return

        HTTPServer.close_request(self, request)