sco_net_v1.register_channel
Registers channel_fqn (“<this plugin id>.<name>”) with flags (SCO_NET_*) and the largest message this side accepts or sends, max_len (1..SCO_NET_MAX_UNREL, or 1..SCO_NET_MAX_RELIABLE with SCO_NET_RELIABLE); a longer incoming message is dropped before it is reassembled. cb runs on the game thread for each message; ctx is borrowed until unregister_channel or unload. Works with or without a session. SCO_BAD_ARG: a bad name, a name outside this plugin’s id, one already registered, bad flags (FROM_HOST with TO_HOST), a bad max_len or a NULL cb. SCO_TOO_MANY: SCO_NET_MAX_CHANNELS already.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, const char *, uint32_t, uint32_t, sco_net_on_message, void *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sco_net_v1.register_channel |
| Record ID | sco-net-v1-register-channel |
| Service | sco.net |
| Table | sco_net_v1 |
| Version macro | SCO_NET_VERSION_1_0 |
| Packed table version | 65536 |
| Since / availability | size >= 48; 1.0 |
| Complete member extent (x64 bytes) | 48 |
| Table size (x64 bytes) | 64 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*register_channel)(sco_plugin* self, const char* channel_fqn, uint32_t flags, uint32_t max_len, sco_net_on_message cb, void* ctx);
Registers channel_fqn (“<this plugin id>.<name>”) with flags (SCO_NET_*) and the largest message this side accepts or sends, max_len (1..SCO_NET_MAX_UNREL, or 1..SCO_NET_MAX_RELIABLE with SCO_NET_RELIABLE); a longer incoming message is dropped before it is reassembled. cb runs on the game thread for each message; ctx is borrowed until unregister_channel or unload. Works with or without a session. SCO_BAD_ARG: a bad name, a name outside this plugin’s id, one already registered, bad flags (FROM_HOST with TO_HOST), a bad max_len or a NULL cb. SCO_TOO_MANY: SCO_NET_MAX_CHANNELS already.
Results and failures
Section titled “Results and failures”Absent table: query_service NOT_FOUND. Stopped result methods: UNAVAILABLE; self-taking methods reject invalid/released self with BAD_ARG; allocation exceptions: TOO_MANY. Additional failures/output state unspecified unless described in the buffer contract.
Absent capability
Section titled “Absent capability”Absent table: query_service NOT_FOUND.
Ownership
Section titled “Ownership”Name copied; cb/ctx borrowed until unregister/unload. Callback buf valid for call only; host registry allocation.
Thread affinity
Section titled “Thread affinity”Any thread; callbacks game thread. Callbacks may call any method in this table.
Callback context
Section titled “Callback context”callbacks game thread.
Reentrancy
Section titled “Reentrancy”Callbacks may call any method in this table.
Cleanup and cancellation
Section titled “Cleanup and cancellation”Ordinary unregister/unload/non-retained crash cleanup removes the channel; incoming oversized payload dropped before reassembly; no callback cancel token. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls.
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/sco_net.h(*register_channel) |
| cpp | typed-wrapper | include/scosdk/net.hppc.r_ = t_->register_channel(self_, name, flags, maxLen, &NetChannel::Thunk, c.fn_.get()); |
| csharp | unsupported | docs/sdk-csharp.mdThere are no C# wrappers for |
| lua | unsupported | docs/net.mdThe C# ( |
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.