A modern Source RCON library for C++
  • C++ 86.6%
  • CMake 12.3%
  • C 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] de811dfaae
build(deps): bump actions/checkout from 6.0.1 to 6.0.2 (#25)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8e8c483db8...de0fac2e45)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-01 11:01:30 +00:00
.github build(deps): bump actions/checkout from 6.0.1 to 6.0.2 (#25) 2026-03-01 11:01:30 +00:00
cmake feat, ci, build: library no longer header-only. Windows CIs now added, Project is now packagable. (#8) 2023-12-28 15:14:51 +00:00
include/rconpp fix: added missing header 2026-01-17 21:39:30 +00:00
src/rconpp feat: added logging for too many auth attempts 2026-01-17 21:38:02 +00:00
unittest feat, fix: Improved logging, improved handling of sockets, fixed crashing issues on Linux/Unix. (#24) 2026-01-16 23:06:13 +00:00
.gitignore feat, ci, build: library no longer header-only. Windows CIs now added, Project is now packagable. (#8) 2023-12-28 15:14:51 +00:00
CMakeLists.txt fix, ci: general code improvements, removed some ci runners. (#15) 2026-01-05 22:22:00 +00:00
CMakeSettings.json fix: library now builds. Couple more changes. 2023-12-19 15:54:37 +00:00
LICENSE Initial commit 2023-12-17 18:59:16 +00:00
rconpp.pc.in feat, ci, build: library no longer header-only. Windows CIs now added, Project is now packagable. (#8) 2023-12-28 15:14:51 +00:00
README.md feat: added custom logging, changed how servers/clients start (#10) 2024-04-05 11:29:48 +01:00

rcon++

Rcon++ is a modern Source RCON library for C++, allowing people to easily use RCON however they like!

Library Features

  • Support for Valve and non-Valve games.
  • Callbacks, allowing non-blocking calls.
  • Support for hosting an RCON server.

To-do

  • Support for multiple response packets.

Library Usage

This library is used in:

If you're using this library, feel free to message me and show me, you might just get your project shown here!

Supported Systems

Linux and Unix

This library was originally made and tested on Linux & UNIX (more specifically OSX) and will work perfectly on these!

Windows

Windows is fully supported and tested! We natively support MSVC and clang-cl, but not MinGW. We do not test support for MinGW, nor do we want to actively try and support it. You can try MinGW at your own risk.

Getting Started

rcon++ can be installed from the releases section!

We're aiming to start rolling out to package managers soon!

Quick Example

Client

#include <iostream>
#include <rconpp/rcon.h>

int main() {
        rconpp::rcon_client client("127.0.0.1", 27015, "changeme");
	
        client.on_log = [](const std::string_view& log) {
                std::cout << log << "\n";
        };

        client.start(true);
	
        client.send_data("Hello!", 3, rconpp::data_type::SERVERDATA_EXECCOMMAND, [](const rconpp::response& response) {
                std::cout << "response: " << response.data << "\n";
        });
        
        return 0;
}

Server

#include <iostream>
#include <rconpp/rcon.h>

int main() {
        rconpp::rcon_server server("0.0.0.0", 27015, "testing");

        server.on_log = [](const std::string_view log) {
            std::cout << log << "\n";
        };

        server.on_command = [](const rconpp::client_command& command) {
                if (command.command == "/test") {
                        return "This is a test!";
                } else {
                        return "Hello!";
                }
        };

        server.start(false);
        
        return 0;
}

Contributing

If you want to help out, simply make a fork and submit your PR! Once the PR has been reviewed and accepted, we will eventually merge it into the project!

Please note that PRs may take a few days to fully review/accept, so be patient!

Support us

If you like this project, be sure to give us a ️! It really helps us out!