예제 #1
0
 /// <summary>
 /// Sends the specified command to the server to be executed.
 /// </summary>
 /// <param name="commands">The command to execute.</param>
 /// <param name="responseCallback">The CommunicatorResponseEventHandler to use for handling the
 /// response from this command execution. If this value is provided the Response event will not be raised.</param>
 public void Execute(RdlCommandGroup commands, CommunicatorResponseEventHandler responseCallback)
 {
     this.Buffer      = commands.ToBytes();
     this.AltCallback = responseCallback;
     this.CreateRequest();
     this.Request.BeginGetRequestStream(new AsyncCallback(HttpCommunicator.BeginRequest), this);
 }
예제 #2
0
        /// <summary>
        /// Sends the specified command to the server to be executed.
        /// </summary>
        /// <param name="commands">The command to execute.</param>
        /// <param name="responseCallback">The CommunicatorResponseEventHandler to use for handling the
        /// response from this command execution. If this value is provided the Response event will not be raised.</param>
        public void Execute(RdlCommandGroup commands, CommunicatorResponseEventHandler responseCallback)
        {
            _altResponse = responseCallback;
            // Create a message with the appropriate SOAPAction and asynchronously send it on the channel with the serialized Stock as the body of the envelope
            Message message = Message.CreateMessage(MessageVersion.Soap11, "Radiance.Contract.IGameServer/Process", commands.ToBytes());

            Send(_channel, message);
        }
예제 #3
0
        /// <summary>
        /// Sends the specified command to the server using the current CommunicationProtocol and provides an
        /// alternate handler for the server response.
        /// </summary>
        /// <param name="command">The CommandTag to send to the server.</param>
        /// <param name="serverResponseCallback">The CommunicatorResponseEventHandler that will handle the
        /// response from this command.</param>
        public void SendCommand(RdlCommand command, CommunicatorResponseEventHandler serverResponseCallback)
        {
            RdlCommandGroup group = new RdlCommandGroup(new RdlCommand[] { command });

            group.AuthKey     = this.AuthKey;
            group.AuthKeyType = this.AuthKeyType;

            this.Init();
            _communicator.Execute(group, serverResponseCallback);
        }
예제 #4
0
 /// <summary>
 /// Sends the specified command to the server to be executed.
 /// </summary>
 /// <param name="commands">The command to execute.</param>
 /// <param name="responseCallback">The CommunicatorResponseEventHandler to use for handling the
 /// response from this command execution. If this value is provided the Response event will not be raised.</param>
 public void Execute(RdlCommandGroup commands, CommunicatorResponseEventHandler responseCallback)
 {
     this.AltCallback = responseCallback;
     this.Send(commands.ToBytes());
 }