xcSetServerIPAndPort method

Future<int> xcSetServerIPAndPort(
  1. String serverKey,
  2. String serverIP, {
  3. int httpsPort = 443,
  4. int httpPort = 80,
})

Implementation

Future<int> xcSetServerIPAndPort(String serverKey, String serverIP,
    {int httpsPort = 443, int httpPort = 80}) async {
  final result =
      await _api.setServerIPAndPort(serverKey, serverIP, httpsPort, httpPort);
  XCloudResponse response = XCloudResponse.fromOriginResponse(result);
  if (!response.success) {
    return Future.error(XCloudAPIException(code: response.code,commandId: result.commandId));
  }
  return Future.value(response.code);
}