### Connect to RCON Server and Send Command Source: https://github.com/challengermode/corercon/blob/master/README.md Connect to an RCON server using its IP address, port, and password. Send commands and retrieve responses as strings or parsed objects. ```cs using CoreRCON; using CoreRCON.Parsers.Standard; using System.Net; // ... // Connect to a server var rcon = new RCON(IPAddress.Parse("10.0.0.1"), 27015, "secret-password"); await rcon.ConnectAsync(); // Send a simple command and retrive response as string string response = await rcon.SendCommandAsync("echo hi"); // Send "status" and try to parse the response Status status = await rcon.SendCommandAsync("status"); Console.WriteLine($"Connected to: {status.Hostname}"); ``` -------------------------------- ### Listen for Chat Messages Source: https://github.com/challengermode/corercon/blob/master/README.md Listen for chat messages from game servers using UDP. This requires the server to be configured to send logs to your listening address and port. ```cs using CoreRCON; using CoreRCON.Parsers.Standard; // ... // Listen on port 50000 for log packets coming from 10.0.0.1:27015 var log = new LogReceiver(50000, new IPEndPoint(IPAddress.Parse("10.0.0.1"), 27015)); log.Listen(chat => { Console.WriteLine($"Chat message: {chat.Player.Name} said {chat.Message} on channel {chat.Channel}"); }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.