public void sendMessage_Process(int seqid, TProtocol iprot, TProtocol oprot) { sendMessage_args args = new sendMessage_args(); args.Read(iprot); iprot.ReadMessageEnd(); sendMessage_result result = new sendMessage_result(); try { result.Success = iface_.sendMessage(args.Message); oprot.WriteMessageBegin(new TMessage("sendMessage", 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("sendMessage", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public string recv_sendMessage() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } sendMessage_result result = new sendMessage_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "sendMessage failed: unknown result"); }
public void sendMessage_Process(int seqid, TProtocol iprot, TProtocol oprot) { sendMessage_args args = new sendMessage_args(); args.Read(iprot); iprot.ReadMessageEnd(); sendMessage_result result = new sendMessage_result(); try { result.Success = iface_.sendMessage(args.Seq, args.Message); } catch (TalkException e) { result.E = e; } oprot.WriteMessageBegin(new TMessage("sendMessage", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public Message recv_sendMessage() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } sendMessage_result result = new sendMessage_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return result.Success; } if (result.__isset.e) { throw result.E; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "sendMessage failed: unknown result"); }