public void Update_Process(int seqid, TProtocol iprot, TProtocol oprot) { Update_args args = new Update_args(); args.Read(iprot); iprot.ReadMessageEnd(); Update_result result = new Update_result(); try { iface_.Update(args.Person); oprot.WriteMessageBegin(new TMessage("Update", TMessageType.Reply, seqid)); result.Write(oprot); } catch (TTransportException) { throw; } catch (Exception ex) { Console.Error.WriteLine("Error occurred in processor:"); Console.Error.WriteLine(ex.ToString()); TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error."); oprot.WriteMessageBegin(new TMessage("Update", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public void Update_Process(int seqid, TProtocol iprot, TProtocol oprot) { Update_args args = new Update_args(); args.Read(iprot); iprot.ReadMessageEnd(); Update_result result = new Update_result(); iface_.Update(args.Res); oprot.WriteMessageBegin(new TMessage("Update", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public void recv_Update() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } Update_result result = new Update_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); return; }