public void SendCommand(string authKey, string authKeyType, RdlCommand cmd, ServerResponseEventHandler callback, RdlTagCollection tags) { //RdlCommandGroup group = new RdlCommandGroup(new RdlCommand[] { cmd }); //group.AuthKey = authKey; //group.AuthKeyType = authKeyType; //if (tags != null) //{ // group.Tags.AddRange(tags); //} //#if DEBUG // Logger.LogDebug(String.Concat("CLIENT CMD = ", group.ToString())); //#endif //var commands = new RdlCommandGroup(new RdlCommand[] { cmd }); //commands.AuthKey = authKey; //commands.AuthKeyType = authKeyType; Logger.LogDebug(String.Format("Sending Command: {0}", cmd)); _altResponse = callback; //_client.ProcessAsync(commands.ToBytes()); _manager.AuthKey = authKey; _manager.AuthKeyType = authKeyType; _manager.SendCommand(cmd, (e) => { if (e.Tags.Count > 0) { if (_altResponse != null) { _altResponse(new ServerResponseEventArgs(e.Tags)); _altResponse = null; } else { this.Response(new ServerResponseEventArgs(e.Tags)); } } }); }
public void SendCommand(string authKey, string authKeyType, RdlCommand cmd, ServerResponseEventHandler callback) { this.SendCommand(authKey, authKeyType, cmd, callback, null); }
public void SendCommand(RdlCommand cmd, ServerResponseEventHandler callback) { this.SendCommand(Settings.PlayerAuthKey, "Player", cmd, callback, null); }
private void SendCommand(string authKey, string authKeyType, string commandName, ServerResponseEventHandler callback, params object[] args) { RdlCommand cmd = new RdlCommand(commandName.ToUpper()); if (args != null && args.Length > 0) { cmd.Args.AddRange(args); } this.SendCommand(authKey, authKeyType, cmd, callback, null); }
public void SendCommand(string commandName, ServerResponseEventHandler callback, params object[] args) { this.SendCommand(Settings.PlayerAuthKey, "Player", commandName, callback, args); }