Example #1
0
        public void call_Process(int seqid, TProtocol iprot, TProtocol oprot)
        {
            call_args args = new call_args();

            args.Read(iprot);
            iprot.ReadMessageEnd();
            call_result result = new call_result();

            try
            {
                result.Success = iface_.call(args.Registry, args.Item, args.Request);
                oprot.WriteMessageBegin(new TMessage("call", 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("call", TMessageType.Exception, seqid));
                x.Write(oprot);
            }
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }
Example #2
0
        public void send_call(string registry, string item, Dictionary <string, string> request)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("call", TMessageType.Call, seqid_));
            call_args args = new call_args();

            args.Registry = registry;
            args.Item     = item;
            args.Request  = request;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }
Example #3
0
 /// <summary>
 /// This procedure allows a client to call another remote procedure on the same machine without knowing the remote procedure's port number.
 /// It is intended for supporting broadcasts to arbitrary remote programs via the well-known port mapper's port.  The parameters "prog",
 /// "vers", "proc", and the bytes of "args" are the program number, version number, procedure number, and parameters of the remote
 /// procedure.
 /// Note:
 /// (1) This procedure only sends a reply if the procedure was successfully executed and is silent (no reply) otherwise.
 /// (2) The port mapper communicates with the remote program using UDP only.
 ///
 /// The procedure returns the remote program's port number, and the reply is the reply of the remote procedure.
 /// </summary>
 public Task <call_result> CallIt(call_args args)
 {
     return(CreateTask <call_args, call_result>(5u, args));
 }