Skip to content
AtlasDocs
Sign inGet started
Updated Oct 03, 2026

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();
Atlas.h:95
Poll the server to confirm the current session is still valid. true on success, false otherwise - call Data::GetErrorMessage() for the reason.
Returns
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();
Atlas.h:100
Milliseconds to open a TCP connection to the auth server - about one round trip. Returns -1 if it can't connect within 5 seconds.
Returns
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);
Atlas.h:98
Emit a custom log line to the dashboard's Logs tab.
Parameters
NameTypeDescription
log_textoptionalstringUp to 512 characters.
Returns
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);
Atlas.h:96
Fetch a dashboard-uploaded file by numeric id. Empty vector (C++), empty Buffer (JS) or empty bytes (Python) on failure.
Parameters
NameTypeDescription
file_idintThe slot number of the file under Dashboard → Settings → Files (1 to 3 on the Free plan).
Returns
vector<uint8_t>File bytes. Empty if not found or on transport failure.

BanUser

BanUserbool BanUser(const std::string& reason, int duration_minutes);
Atlas.h:97
Ban the current user from your app. duration_minutes = 0 means permanent.
Parameters
NameTypeDescription
reasonoptionalstringFree-text reason; stored against the ban row.
duration_minutesoptionalint= 00 = permanent. Otherwise, minutes until the ban auto-lifts.
Returns
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);
Atlas.h:99
Change the signed-in account's password. Account sessions only.
Parameters
NameTypeDescription
old_passwordoptionalstringCurrent password. The server verifies before accepting the change.
new_passwordoptionalstringNew password.
Returns
boolWhether the change was accepted.