dropHosts method

Future<ExecResp> dropHosts(
  1. DropHostsReq? req
)
override

Implementation

Future<ExecResp> dropHosts(DropHostsReq? req) async {
  oprot.writeMessageBegin(
      new TMessage("dropHosts", TMessageType.CALL, nextSeqid()));
  dropHosts_args args = new dropHosts_args();
  args.req = req;
  args.write(oprot);
  oprot.writeMessageEnd();

  await oprot.trans_.flush();

  TMessage msg = iprot.readMessageBegin();
  if (msg.type == TMessageType.EXCEPTION) {
    TApplicationError error = TApplicationError.read(iprot);
    iprot.readMessageEnd();
    throw error;
  }

  dropHosts_result result = new dropHosts_result();
  result.read(iprot);
  iprot.readMessageEnd();
  if (result.isSetSuccess()) {
    return result.success!;
  }

  throw new TApplicationError(TApplicationErrorType.MISSING_RESULT,
      "dropHosts failed: unknown result");
}