예제 #1
0
def main():
    args, args_parser = parse_cli_args()
    cli_utils.init_logging(args)

    if hasattr(args, "func"):
        args.func(args)
    else:
        interactive_loop(args)
예제 #2
0
def main():
    global _log_server_updates
    args, args_parser = parse_cli_args()
    init_logging(args)

    _log_server_updates = args.log_server_updates

    server = Server()
    server.run(args.port)
예제 #3
0
파일: server.py 프로젝트: nondejus/mixer
def main():
    global _log_server_updates
    args, args_parser = parse_cli_args()
    init_logging(args)
    if args.latency > 0.0:
        logger.warning(f"Latency set to {args.latency} ms")
    if args.bandwidth > 0.0:
        logger.warning(f"Bandwidth limited to {args.bandwidth} Mbps")
    _log_server_updates = args.log_server_updates

    server = Server()
    server.latency = args.latency / 1000.0
    server.bandwidth = args.bandwidth
    server.run(args.port)