예제 #1
0
   public FlushCommandsResponse flushCommands(FlushCommandsRequest flushCommandsReq)
   {
 #if !SILVERLIGHT
       send_flushCommands(flushCommandsReq);
       return(recv_flushCommands());
 #else
       var asyncResult = Begin_flushCommands(null, null, flushCommandsReq);
       return(End_flushCommands(asyncResult));
 #endif
   }
예제 #2
0
    /// <summary>
    /// Pulls the commands from the server and propagates them to the game objects
    /// </summary>
    void PullCommands()
    {
        FlushCommandsRequest flushCommandsRequest = new FlushCommandsRequest();

        flushCommandsRequest.ClientId = GameManager.SESSION_ID;
        FlushCommandsResponse flushCommandsResponse = client.flushCommands(flushCommandsRequest);

        foreach (GameCommand gameCommand in flushCommandsResponse.Commands)
        {
            PropagateCommand(gameCommand);
        }
    }
예제 #3
0
        public void send_flushCommands(FlushCommandsRequest flushCommandsReq)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("flushCommands", TMessageType.Call, seqid_));
            flushCommands_args args = new flushCommands_args();

            args.FlushCommandsReq = flushCommandsReq;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }
예제 #4
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.Struct)
                        {
                            FlushCommandsReq = new FlushCommandsRequest();
                            FlushCommandsReq.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
예제 #5
0
 public IAsyncResult send_flushCommands(AsyncCallback callback, object state, FlushCommandsRequest flushCommandsReq)
예제 #6
0
 public IAsyncResult Begin_flushCommands(AsyncCallback callback, object state, FlushCommandsRequest flushCommandsReq)
 {
     return(send_flushCommands(callback, state, flushCommandsReq));
 }