public void Send_Process(int seqid, TProtocol iprot, TProtocol oprot) { Send_args args = new Send_args(); args.Read(iprot); iprot.ReadMessageEnd(); Send_result result = new Send_result(); try { TSocket t = (TSocket)iprot.Transport; result.Success = iface_.Send(args.My_args, t.TcpClient.Client.RemoteEndPoint.ToString()); oprot.WriteMessageBegin(new TMessage("Send", TMessageType.Reply, seqid)); result.Write(oprot); } catch (TTransportException ttx) { logger.LogError(ttx, "GrantService.Send_Process.ttx.Error"); } catch (Exception ex) { logger.LogError(ex, "GrantService.Send_Process.ex.Error"); TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error."); oprot.WriteMessageBegin(new TMessage("Send", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public void Send_Process(int seqid, TProtocol iprot, TProtocol oprot) { Send_args args = new Send_args(); args.Read(iprot); iprot.ReadMessageEnd(); Send_result result = new Send_result(); result.Success = iface_.Send(args.Message); oprot.WriteMessageBegin(new TMessage("Send", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public ThriftMessage recv_Send() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } Send_result result = new Send_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Send failed: unknown result"); }
public string recv_Send() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); logger.LogError(x, "GrantService.recv_Send.Error"); return(null); } Send_result result = new Send_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return(result.Success); } logger.LogError(new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Send failed: unknown result"), "Send failed: unknown result"); return(null); }
public ThriftMessage recv_Send() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } Send_result result = new Send_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return result.Success; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Send failed: unknown result"); }