def METHOD_NAME(args):
    if args.socket:
        address = '\0' + args.socket
    else:
        address = DEFAULT_SERVER_ADDRESS
    conn = Connection(address)
    msgparser = MsgParser(conn)
    version = None
    name = None
    mangohud_version = None
    msgs = msgparser.readCmd(3)
    for m in msgs:
        cmd, param = m
        if cmd == VERSION_HEADER:
            version = int(param)
        elif cmd == DEVICE_NAME_HEADER:
            name = param.decode('utf-8')
        elif cmd == MANGOHUD_VERSION_HEADER:
            mangohud_version = param.decode('utf-8')
    if args.info:
        info = "Protocol Version: {}\n"
        info += "Device Name: {}\n"
        info += "MangoHud Version: {}"
        print(info.format(version, name, mangohud_version))
    if args.cmd == 'toggle-logging':
        conn.send(bytearray(':logging;', 'utf-8'))
    elif args.cmd == 'start-logging':
        conn.send(bytearray(':logging=1;', 'utf-8'))
    elif args.cmd == 'stop-logging':
        conn.send(bytearray(':logging=0;', 'utf-8'))
        now = time.monotonic()
        while True:
            msg = str(conn.recv(3))
            if "LoggingFinished" in msg:
                print("Logging has stopped")
                exit(0)
            elapsed = time.monotonic() - now
            if elapsed > 3:
                print("Stop logging timed out")
                exit(1)
    elif args.cmd == 'toggle-hud':
        conn.send(bytearray(':hud;', 'utf-8'))
    elif args.cmd == 'toggle-fcat':
        conn.send(bytearray(':fcat;', 'utf-8'))