Skip to content

BinaryAlien/libssq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libssq

☢️ An up-to-date Source Server query protocol library written in C99.

Features

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.

Documentation

The wiki of this repository provides documentation about the library and gets updated accordingly.

To quickly get started, check out the example program.

Build

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.

Example

  • 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
$ gcc -std=c99 -Iinclude -o ssq example/example.c -Lbuild -lssq
$ ./ssq
usage: ./ssq hostname [port]