public void Sum_Process(int seqid, TProtocol iprot, TProtocol oprot) { Sum_args args = new Sum_args(); args.Read(iprot); iprot.ReadMessageEnd(); Sum_result result = new Sum_result(); result.Success = iface_.Sum(args.X, args.Y); oprot.WriteMessageBegin(new TMessage("Sum", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public int recv_Sum() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } Sum_result result = new Sum_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return result.Success; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Sum failed: unknown result"); }
public int recv_Sum() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } Sum_result result = new Sum_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Sum failed: unknown result"); }