initMqtt method

Future<int> initMqtt(
  1. String userId,
  2. String accessToken,
  3. String packetName
)

Implementation

Future<int> initMqtt(
    String userId, String accessToken, String packetName) async {
  int code = await _api.mqttInit(userId, accessToken, packetName, 10000);
  if (code < 0) {
    return Future.error(XCloudAPIException(
      code: code,
      commandId: 0,
    ));
  }
  return code;
}