def start_test_server(protocol=TestServer): config = Config() config.add_service('', 40002, Factory.forProtocol(protocol)) config.start_logger(level=logging.DEBUG) server = MainLoop(config) server.start()
def start_server_loop(cls, port): config = Config() config.add_service('', port, Factory.forProtocol(ReturnFixedMessage)) config.start_logger(target=cls.server_logfile, level=logging.DEBUG) server = MainLoop(config) server.start()