public void echo_Process(int seqid, TProtocol iprot, TProtocol oprot) { echo_args args = new echo_args(); args.Read(iprot); iprot.ReadMessageEnd(); echo_result result = new echo_result(); result.Success = iface_.echo(args.Msg); oprot.WriteMessageBegin(new TMessage("echo", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public string recv_echo() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } echo_result result = new echo_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "echo failed: unknown result"); }