/// <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); }
/// <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()); }
/// <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); }