static void Main(string[] args) { RconClient networkClient = new RconClient("127.0.0.1", 2310, "local"); networkClient.Connected += NetworkClient_Connected; networkClient.Disconnected += NetworkClient_Disconnected; networkClient.MessageReceived += NetworkClient_MessageReceived; networkClient.PlayerConnected += NetworkClient_PlayerConnected; networkClient.PlayerDisconnected += NetworkClient_PlayerDisconnected; networkClient.PlayerRemoved += NetworkClient_PlayerRemoved; networkClient.Connect(); networkClient.WaitUntilConnected(); bool requestSuccess = networkClient.Fetch( command: new GetPlayersRequest(), timeout: 5000, result: out List <Player> onlinePlayers); if (requestSuccess) { Console.WriteLine($"Players online: {onlinePlayers.Count}"); } var bansFetchSuccess = networkClient.Fetch(new GetBansRequest(), 5000, out List <PlayerBan> bans); if (bansFetchSuccess) { Console.WriteLine($"{bans.Count} bans"); } networkClient.Send(new SendMessageCommand("This is a global message")); Console.ReadLine(); }