Beispiel #1
0
 public DNHAuthResponse recv_Authenticate()
 {
   TMessage msg = iprot_.ReadMessageBegin();
   if (msg.Type == TMessageType.Exception) {
     TApplicationException x = TApplicationException.Read(iprot_);
     iprot_.ReadMessageEnd();
     throw x;
   }
   Authenticate_result result = new Authenticate_result();
   result.Read(iprot_);
   iprot_.ReadMessageEnd();
   if (result.__isset.success) {
     return result.Success;
   }
   throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Authenticate failed: unknown result");
 }
Beispiel #2
0
 public void Authenticate_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   Authenticate_args args = new Authenticate_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   Authenticate_result result = new Authenticate_result();
   result.Success = iface_.Authenticate(args.UserName, args.PasswordHash);
   oprot.WriteMessageBegin(new TMessage("Authenticate", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }