heartBeat method
Implementation
Future<HBResp> heartBeat(HBReq? req) async {
oprot.writeMessageBegin(
new TMessage("heartBeat", TMessageType.CALL, nextSeqid()));
heartBeat_args args = new heartBeat_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;
}
heartBeat_result result = new heartBeat_result();
result.read(iprot);
iprot.readMessageEnd();
if (result.isSetSuccess()) {
return result.success!;
}
throw new TApplicationError(TApplicationErrorType.MISSING_RESULT,
"heartBeat failed: unknown result");
}