sc_private_session_v1.get_state
out.size must cover 16 bytes; copy session state, peer count and configured host max_peers (0 for joiner/idle unknown). No owner handle is required. Output size becomes 16; unknown tail untouched. Admission loss leaves the session and returns UNAVAILABLE without copying output.
Signature
Section titled “Signature”sco_result (*)(sc_private_session_state_v1 *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sc_private_session_v1.get_state |
| Record ID | sc-private-session-v1-get-state |
| Service | game.private_session |
| Table | sc_private_session_v1 |
| Version macro | SC_PRIVATE_SESSION_VERSION |
| Packed table version | 65536 |
| Since / availability | size >= 40; 1.0 |
| Complete member extent (x64 bytes) | 40 |
| Table size (x64 bytes) | 40 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*get_state)(sc_private_session_state_v1* out);
out.size must cover 16 bytes; copy session state, peer count and configured host max_peers (0 for joiner/idle unknown). No owner handle is required. Output size becomes 16; unknown tail untouched. Admission loss leaves the session and returns UNAVAILABLE without copying output.
Results and failures
Section titled “Results and failures”OK copied state; BAD_ARG null/short output; WRONG_THREAD; UNAVAILABLE absent broker, runtime stopping, reentrant call or admission loss.
Absent capability
Section titled “Absent capability”Disabled broker, absent admission/owner cleanup or failed registration leaves game.private_session false/unavailable. Enabled default is loopback-only and opens no socket before explicit Host/Join.
Ownership
Section titled “Ownership”Host owns one session and its requesting owner; request strings are borrowed for the call and copied into host storage. Plugins receive no socket/bind/allowlist authority. Caller owns copied state.
Thread affinity
Section titled “Thread affinity”Game thread only; WRONG_THREAD before state access.
Callback context
Section titled “Callback context”No plugin callback; offline/EAC inspection and transport are host-owned.
Reentrancy
Section titled “Reentrancy”Nested calls during broker operations are refused with UNAVAILABLE.
Cleanup and cancellation
Section titled “Cleanup and cancellation”Requesting-owner unload, explicit leave, admission loss or host stop leaves session. Stop withdraws service. Credentials are volatile backend state, not plugin-controlled persistent storage.
Language mappings
Section titled “Language mappings”Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.
| Language | Catalogue status | Source evidence / wrapper tokens |
|---|---|---|
| c | direct | include/sc_private_session.h(*get_state) |
| cpp | direct | include/sc_private_session.h(*get_state) |
| csharp | unsupported | docs/contracts.mdC# and Lua game.private_session routes are unsupported. |
| lua | unsupported | docs/contracts.mdC# and Lua game.private_session routes are unsupported. |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
ABI pins prove layout, not semantic behavior or a live game session.