Ejemplo n.º 1
0
 public void banIp_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   banIp_args args = new banIp_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   banIp_result result = new banIp_result();
   try {
     result.Success = iface_.banIp(args.AuthString, args.Ip);
   } catch (org.phybros.thrift.EAuthException aex) {
     result.Aex = aex;
   }
   oprot.WriteMessageBegin(new TMessage("banIp", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
Ejemplo n.º 2
0
 public bool recv_banIp()
 {
   TMessage msg = iprot_.ReadMessageBegin();
   if (msg.Type == TMessageType.Exception) {
     TApplicationException x = TApplicationException.Read(iprot_);
     iprot_.ReadMessageEnd();
     throw x;
   }
   banIp_result result = new banIp_result();
   result.Read(iprot_);
   iprot_.ReadMessageEnd();
   if (result.__isset.success) {
     return result.Success;
   }
   if (result.__isset.aex) {
     throw result.Aex;
   }
   throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "banIp failed: unknown result");
 }