Files
VoidTeamspeak/README.md
T
faumaray 7b8dcd9f31 Update
Signed-off-by: faumaray <faumaray@gmail.com>
2026-07-12 15:16:44 +03:00

74 lines
2.5 KiB
Markdown

# VoidTeamspeak
VoidTeamspeak is a modern C++26 implementation of the TeamSpeak 3/6 native
client protocol. It connects as a real voice client without embedding the
official GUI client or depending on its proprietary ClientLib.
The public API follows the concepts of the original TeamSpeak Client SDK while
using RAII, strong IDs, chrono durations, spans, typed events, and
`Void::Result`. The lower-level implementation lives under
`Void::TeamSpeak::Protocol`; application code should use the owning facade.
## Public API
```cpp
#include <Void/TeamSpeak/TeamSpeak.hpp>
auto identity = std::make_shared<Void::TeamSpeak::Identity>(
Void::TeamSpeak::Identity::load("identity.txt"));
Void::TeamSpeak::Client client;
client.setEvents({
.connected = [] { /* ready */ },
.error = [](const Void::TeamSpeak::Error& error) { /* report */ },
});
auto connected = client.connect({
.host = "voice.example.net",
.identity = std::move(identity),
.nickname = "music bot",
});
```
Each `Client` owns one connection and encrypted packet sequence. For different
audio programs on that same visible identity, create logical `VoiceStreamId`
handles and call `sendWhisper(stream, frame, targets)`. Each handle keeps an
independent inner voice sequence while the connection retains its one global
outer packet sequence.
## Build
```sh
cmake -S . -B build \
-DCPM_Void_SOURCE="$HOME/Project/Personal/VoidLibrary" \
-DVOID_TEAMSPEAK_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failure
```
Dependencies are VoidLibrary, OpenSSL, libsodium, and optionally libopus.
## SDK mapping
The detailed and deliberately conservative status is tracked in
[`SDK_PARITY.md`](SDK_PARITY.md).
| Original Client SDK concept | VoidTeamspeak |
|---|---|
| connection handler ID | owning `Client` object |
| `ts3client_startConnection` | `Client::connect(ConnectOptions)` |
| `ts3client_stopConnection` | `Client::disconnect()` |
| `ts3client_getClientID` | `Client::id()` returning `ClientId` |
| request + return code callback | `Client::request()` returning a typed result |
| whisper-list arrays | `WhisperTargets` with strong channel/client IDs |
| global callback table | per-client `Events` |
| raw voice buffers | `sendVoice` / `sendWhisper` spans |
Operations that exist only inside the official GUI client will return a typed
`NotSupported` error as the broader SDK facade is filled out.
## License
MIT. The initial protocol implementation was ported from MIT-licensed
`ts6-manager` and cross-checked against public protocol documentation.