☢️ An up-to-date Source Server query protocol library written in C99.
This library supports each of the three undeprecated A2S queries:
- A2S_INFO,
- A2S_PLAYER,
- and A2S_RULES.
It has no dependencies and is designed to cross-compile on both Windows and UNIX-like operating systems.
However, it does not currently support Goldsource nor compressed responses.
The wiki of this repository provides documentation about the library and gets updated accordingly.
To quickly get started, check out the example program.
This project comes with a CMakeLists.txt
to use with CMake in order to generate a build system to compile the library on your machine.
- Compiling the library from the root of the repository using CMake.
$ pwd
~/libssq
$ mkdir build
$ cd build
$ cmake .. # Generate the build system
$ cmake --build . # Build the library
- Compiling the example program using GCC from the root of the repository.
$ gcc -std=c99 -Iinclude -o ssq example/example.c -Lbuild -lssq
$ ./ssq
usage: ./ssq hostname [port]