Exemplo n.º 1
0
 public void downloadChunk_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   downloadChunk_args args = new downloadChunk_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   downloadChunk_result result = new downloadChunk_result();
   try {
     result.Success = iface_.downloadChunk(args.Id);
   } catch (AuthorizationException aze) {
     result.Aze = aze;
   }
   oprot.WriteMessageBegin(new TMessage("downloadChunk", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
Exemplo n.º 2
0
 public byte[] recv_downloadChunk()
 {
   TMessage msg = iprot_.ReadMessageBegin();
   if (msg.Type == TMessageType.Exception) {
     TApplicationException x = TApplicationException.Read(iprot_);
     iprot_.ReadMessageEnd();
     throw x;
   }
   downloadChunk_result result = new downloadChunk_result();
   result.Read(iprot_);
   iprot_.ReadMessageEnd();
   if (result.__isset.success) {
     return result.Success;
   }
   if (result.__isset.aze) {
     throw result.Aze;
   }
   throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "downloadChunk failed: unknown result");
 }