{"id":19262233,"url":"https://github.com/untodesu/rcon-dotnet","last_synced_at":"2025-04-21T17:31:17.073Z","repository":{"id":111197437,"uuid":"243056266","full_name":"untodesu/rcon-dotnet","owner":"untodesu","description":"Valve RCON Protocol implementation for .NET","archived":false,"fork":false,"pushed_at":"2021-02-11T11:05:26.000Z","size":16,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-21T09:38:22.153Z","etag":null,"topics":["async","client-server","csharp","rcon","rcon-protocol"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/untodesu.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-02-25T17:18:54.000Z","updated_at":"2023-08-21T09:38:23.676Z","dependencies_parsed_at":"2023-08-21T09:48:48.616Z","dependency_job_id":null,"html_url":"https://github.com/untodesu/rcon-dotnet","commit_stats":null,"previous_names":["untodesu/rcon-dotnet"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Frcon-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Frcon-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Frcon-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Frcon-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/untodesu","download_url":"https://codeload.github.com/untodesu/rcon-dotnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223873032,"owners_count":17217865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","client-server","csharp","rcon","rcon-protocol"],"created_at":"2024-11-09T19:30:13.784Z","updated_at":"2024-11-09T19:30:14.345Z","avatar_url":"https://github.com/untodesu.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rcon for .NET\n[Valve RCON Protocol](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol) implementation library.  \n**This contains:**\n* RCON Client Interface\n* RCON Server Interface\n* RCON Client\n* RCON Server\n\n# Installation\n#### Package Manager\n```\nPM\u003e Install-Package Rcon -Version 1.0.0\n```\n#### .NET CLI\n```\n\u003e dotnet add package Rcon --version 1.0.0\n```\n#### Project file\n```xml\n\u003cPackageReference Include=\"Rcon\" Version=\"1.0.0\" /\u003e\n```\n\n# Usage example\n## Client\n```cs\nusing System;\nusing System.Threading.Tasks;\nusing Rcon;\n\nnamespace RconClient\n{\n    static class Program\n    {\n        static async Task Main(string[] args)\n        {\n            RconClient client = new RconClient();\n            await client.ConnectAsync(\"127.0.0.1\", 25575);\n            await client.AuthenticateAsync(\"super_secret_password\");\n            if(!client.Authenticated) {\n                Console.WriteLine(\"Invalid password!!\");\n                return;\n            }\n            \n            for(;;) {\n                Console.Write(\"\u003e \");\n                string response = await client.SendCommandAsync(Console.ReadLine());\n                if(!String.IsNullOrEmpty(response)) {\n                    Console.WriteLine(\"] {0}\", response);\n                }\n            }\n        }\n    }\n}\n```\n\n## Server\n```cs\nusing System;\nusing Rcon;\nusing Rcon.Events;\n\nnamespace RconServer\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            using(RconServer server = new RconServer(\"super_secret_password\", 25575)) {\n                server.OnClientCommandReceived += Server_OnClientCommandReceived;\n                server.OnClientConnected += Server_OnClientConnected;\n                server.OnClientAuthenticated += Server_OnClientAuthenticated;\n                server.OnClientDisconnected += Server_OnClientDisconnected;\n                server.Start();\n            }\n        }\n\n        static void Server_OnClientAuthenticated(object sender, ClientAuthenticatedEventArgs e)\n        {\n            Console.WriteLine(\"{0} authenticated\", e.Client.Client.LocalEndPoint);\n        }\n\n        static void Server_OnClientDisconnected(object sender, ClientDisconnectedEventArgs e)\n        {\n            Console.WriteLine(\"{0} disconnected\", e.EndPoint);\n        }\n\n        static void Server_OnClientConnected(object sender, ClientConnectedEventArgs e)\n        {\n            Console.WriteLine(\"{0} connected\", e.Client.Client.LocalEndPoint);\n        }\n\n        static string Server_OnClientCommandReceived(object sender, ClientSentCommandEventArgs e)\n        {\n            Console.WriteLine(\"{0}: {1}\", e.Client.Client.LocalEndPoint, e.Command);\n            return e.Command;\n        }\n    }\n}\n\n```\n\n# Documentation\nStill not, but there are some external docs:  \n* [Valve Developer Community](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol)\n* [Minecraft(?) wiki](https://wiki.vg/RCON)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtodesu%2Frcon-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funtodesu%2Frcon-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtodesu%2Frcon-dotnet/lists"}