CyberM.network.catalog()
The catalog as of the last refresh.
Reads a snapshot: refreshing is asynchronous, so call refresh, then catalog a beat later.
Returns
- table { phase, generation, servers… }
Registered in ResourceHost.cpp as LuaNetworkCatalog (line 6568).
CyberM.network.connect(endpoint, [name])
Joins a CyberM server.
Starts a connection to the supplied CyberM server endpoint using the current identity and resource pipeline. It requires network.client; success means the request was accepted, while connection progress and errors are observed through status().
Parameters
- endpointstringrequired
- namestringoptional
Returns
- true when the request is accepted
- reason for the refusal
Example
local ok, reason = CyberM.network.connect("127.0.0.1:11778", "Player")
Registered in ResourceHost.cpp as LuaNetworkConnect (line 6569).
CyberM.network.disconnect()
Leaves the current server.
Requests an orderly disconnect with an optional diagnostic reason. It returns after queuing teardown; the session phase in status() is the authoritative view of when cleanup has completed.
Registered in ResourceHost.cpp as LuaNetworkDisconnect (line 6570).
CyberM.network.identity()
Reads the local Master-backed identity profile state.
Returns the durable user id, current display name, registration state, and asynchronous update phase. The private key is never exposed. This bridge exists for the trusted local server browser; server-downloaded resources should use the verified player APIs instead.
Returns
- table { phase, generation, userId, displayName, error, registered }, or nil
- reason
Registered in ResourceHost.cpp as LuaNetworkIdentity (line 6573).
CyberM.network.identityUpdate(catalogUrl, displayName)
Requests a signed username update from the Master.
Queues the HTTP enrollment on the networking worker and returns immediately. Poll identity() until the matching generation becomes ready or failed. The backend is deliberately available only to the trusted system server-browser resource and refuses updates during a live session.
Parameters
- catalogUrlstringrequired
- displayNamestringrequired
Returns
- true when queued, otherwise false
- reason
Registered in ResourceHost.cpp as LuaNetworkIdentityUpdate (line 6572).
CyberM.network.refresh([url])
Asks the directory for the server catalog again.
Starts a master-server catalog refresh for the supplied URL and requires network.client. The call only accepts the request; use catalog() to inspect generation, phase, HTTP status, body and error.
Registered in ResourceHost.cpp as LuaNetworkRefresh (line 6567).
CyberM.network.status()
State of the network session.
Returns the current client session snapshot: phase, endpoint, authenticated player identity, routing bucket, rates, server time, ping and downloaded resource-set metadata. Reading it does not initiate a connection or wait for a phase change.
Returns
- table { phase, endpoint, playerId, routingBucket, ping, error }
Registered in ResourceHost.cpp as LuaNetworkStatus (line 6571).