private static void receiveCommands(CliContext ctx) throws TException {
    try (IoTDBConnection connection =
        (IoTDBConnection)
            DriverManager.getConnection(Config.IOTDB_URL_PREFIX + host + ":" + port + "/", info)) {
      connection.setQueryTimeout(queryTimeout);
      properties = connection.getServerProperties();
      AGGREGRATE_TIME_LIST.addAll(properties.getSupportedTimeAggregationOperations());
      timestampPrecision = properties.getTimestampPrecision();

      echoStarting(ctx);
      displayLogo(ctx, properties.getLogo(), properties.getVersion(), properties.getBuildInfo());
      ctx.getPrinter().println(String.format("Successfully login at %s:%s", host, port));
      while (true) {
        boolean readLine = readerReadLine(ctx, connection);
        if (readLine) {
          break;
        }
      }
    } catch (SQLException e) {
      ctx.getErr().printf("%s: %s%n", IOTDB_ERROR_PREFIX, e.getMessage());
      ctx.exit(CODE_ERROR);
    }
  }
IoTDB Client main function.

@param args launch arguments
@throws ClassNotFoundException ClassNotFoundException
iotdb-client/cli/src/main/java/org/apache/iotdb/cli/Cli.java