Overview
Overview of the Blazeauth C++ session API.
The Blazeauth C++ API exposes the WebSocket protocol through blaze::session
and language-native result types.
Design philosophy
If you want the design goals behind the library itself, see Philosophy. That page explains the runtime contract, portability stance, technology choices, and why the library avoids owning your UI/logging/process behavior.
API styles
Every session operation is exposed in the same general forms:
| Style | Example | When to use |
|---|---|---|
| Throwing sync | auto app = session.initialize(key, client_id); | Straightforward code paths where std::system_error is acceptable. |
| No-throw sync | auto app = session.initialize(key, client_id, ec); | Manual error handling without exceptions. |
| Callback | session.async_initialize(key, client_id, callback); | Existing async/event-driven code. |
| Coroutine | auto [ec, app] = co_await session.co_initialize(key, client_id); | Coroutine-based async flows. |
Error model
API-level failures are returned through result objects like application.status.
Transport and runtime failures are returned through std::error_code or
std::system_error.
Runtime hooks
Utilities
Connection
This page is a quick function index.
For full signatures, result schemas, and behavior details, open the dedicated page from each block.
Account Flows
Server events
Files
Moderation and Metrics
Variables and Session Data
Notes
- Common misuse cases are documented on Common pitfalls.
with_timeout,get_io_thread_id,is_connected, andlast_operation_tookare local utility methods and do not perform API requests.connect,shutdown, andpingdo not returnblaze::status.initialize,create_account, bothauthorizeoverloads,get_online_users_count,get_variable,get_session_value,get_current_license,get_current_account,download_file, andget_file_metadatareturn API status through result objects.link_license,logout,blacklist,set_session_value,delete_session_value, andenable_panel_eventsreturn API status directly asblaze::status.get_online_users_countreturns API status throughonline_users_count.status.download_fileis single-result in all API styles. The callback overload completes once with the final result.- Sync overloads use the session timeout configured in the constructor or via
with_timeout(...). - Coroutine overloads are available only when the library is built with coroutine support.