Network Namespace
Ask the server something during a session: check it, download a file, write a log line, ban a user. The library already checks the session in the background, so none of these are required.
All calls
// Check the server still recognises this session - before a sensitive action.if (!Atlas::Network::CheckAuthentication()) { std::cout << Atlas::Data::GetErrorMessage(); return;} // Round-trip latency to the auth server in ms. -1 if unreachable.int ms = Atlas::Network::Ping();if (ms < 0) { /* back off and retry */ } // Write a log line that appears on the dashboard's Logs tab. Max 512 chars.Atlas::Network::SubmitLog("Order #1234 executed"); // Fetch a file uploaded via the dashboard.auto bytes = Atlas::Network::Download(1);if (!bytes.empty()) { std::ofstream f("downloaded.bin", std::ios::binary); f.write(reinterpret_cast<const char*>(bytes.data()), bytes.size());} // Self-ban - duration_minutes = 0 means permanent.Atlas::Network::BanUser("user-initiated account closure", 0); // Change password (account sessions only).Atlas::Network::ChangePassword("old-password", "new-password");CheckAuthentication
CheckAuthenticationbool CheckAuthentication();true on success, false otherwise - call Data::GetErrorMessage() for the reason.boolThe server's verdict on the current session.The DLL's own heartbeat runs on a separate thread regardless (5-second poll for account sessions, persistent socket for license sessions). Call CheckAuthentication when you need a synchronous "is my session still valid right now" check before a sensitive action - opening a paid feature, executing a destructive operation, writing to disk.
Ping
Pingint Ping();-1 if it can't connect within 5 seconds.intMilliseconds, or -1 on transport failure.Useful for a "slow connection" UX cue or for back-off logic. Doesn't require an authenticated session.
SubmitLog
SubmitLogbool SubmitLog(const char* log_text);| Name | Type | Description |
|---|---|---|
log_textoptional | string | Up to 512 characters. |
booltrue when the line was queued; it is sent on the next heartbeat. false for empty text (and, in JS and Python, when there is no signed-in session).Download
Downloadstd::vector<uint8_t> Download(int file_id);| Name | Type | Description |
|---|---|---|
file_id | int | The slot number of the file under Dashboard → Settings → Files (1 to 3 on the Free plan). |
vector<uint8_t>File bytes. Empty if not found or on transport failure.BanUser
BanUserbool BanUser(const std::string& reason, int duration_minutes);duration_minutes = 0 means permanent.| Name | Type | Description |
|---|---|---|
reasonoptional | string | Free-text reason; stored against the ban row. |
duration_minutesoptional | int= 0 | 0 = permanent. Otherwise, minutes until the ban auto-lifts. |
boolWhether the ban was accepted by the server.Typical use: user-initiated account closure from inside the running client. The ban row is also visible on Dashboard → Bans and can be lifted manually.
ChangePassword
ChangePasswordbool ChangePassword(const std::string& old_password, const std::string& new_password);| Name | Type | Description |
|---|---|---|
old_passwordoptional | string | Current password. The server verifies before accepting the change. |
new_passwordoptional | string | New password. |
boolWhether the change was accepted.