# _INet_DecodeToNetbuffer
function _INet_DecodeToNetbuffer(payload)Deserializes payload bytes into global netbuffer fields.
| Parameter | Type | Default | Description |
|---|---|---|---|
payload | dynamic | — | Payload value supplied to `_INet_DecodeToNetbuffer`. |
src/i_net.mlBridges Doom's doomcom/ticcmd packets to the validated multiplayer UDP transport.
d_event.ml → src/d_event.mld_net.ml → src/d_net.mldoomstat.ml → src/doomstat.mli_system.ml → src/i_system.mlm_argv.ml → src/m_argv.mlmp_platform.ml → src/mp_platform.mlstd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencyfunction _INet_DecodeToNetbuffer(payload)Deserializes payload bytes into global netbuffer fields.
| Parameter | Type | Default | Description |
|---|---|---|---|
payload | dynamic | — | Payload value supplied to `_INet_DecodeToNetbuffer`. |
function _INet_EncodeDoomData(d)Serializes doomdata struct into network payload bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
d | dynamic | — | Divisor or direction value used by the operation. |
function _INet_EnsureSlotMobj(slot)Ensures active player slots have a spawned mobj in running level.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | Slot value supplied to `_INet_EnsureSlotMobj`. |
const _INET_MAGIC0 = 68Defines inet magic0 for the i net subsystem.
const _INET_MAGIC1 = 78Defines inet magic1 for the i net subsystem.
const _INET_MAGIC2 = 69Defines inet magic2 for the i net subsystem.
const _INET_MAGIC3 = 84Defines inet magic3 for the i net subsystem.
inline function _INet_ReadI32LE(buf, off)Reads a signed 32-bit integer from a byte buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_INet_ReadI32LE`. |
off | dynamic | — | Zero-based byte or element offset. |
inline function _INet_RemoveSlotMobj(slot)Removes mobj for inactive player slots.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | Slot value supplied to `_INet_RemoveSlotMobj`. |
function _INet_SlotIsActive(activeSlots, slot)Returns whether a slot index exists in the active slot list.
| Parameter | Type | Default | Description |
|---|---|---|---|
activeSlots | dynamic | — | Active slots value supplied to `_INet_SlotIsActive`. |
slot | dynamic | — | Slot value supplied to `_INet_SlotIsActive`. |
function _INet_SyncRuntimeFromPlatform()Synchronizes doom net runtime globals from mp platform role/state.
function _INet_ToInt(v, fallback)Converts values to integers with deterministic rounding.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
inline function _INet_WriteI32LE(buf, off, v)Writes a signed 32-bit integer to a byte buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_INet_WriteI32LE`. |
off | dynamic | — | Zero-based byte or element offset. |
v | dynamic | — | Value consumed by the operation. |
function BindToLocalPort(sock, port)Legacy compatibility stub that rejects external bind attempts to preserve mp_platform socket ownership.
| Parameter | Type | Default | Description |
|---|---|---|---|
sock | dynamic | — | Sock value supplied to `BindToLocalPort`. |
port | dynamic | — | Port value supplied to `BindToLocalPort`. |
function GetLocalAddress()Returns the IPv4 loopback identity used by the legacy single-host API surface.
function I_InitNetwork()Resets doomcom and tic queues to deterministic single-player defaults before any MP role starts.
function I_NetCmd()Executes one Doom CMD_GET/CMD_SEND operation through the validated platform packet queue.
function PacketGet(sock, nodeOut, dataOut, lengthOut)Legacy compatibility stub that returns an empty receive result without touching caller payload storage.
| Parameter | Type | Default | Description |
|---|---|---|---|
sock | dynamic | — | Sock value supplied to `PacketGet`. |
nodeOut | dynamic | — | Node out value supplied to `PacketGet`. |
dataOut | dynamic | — | Data out value supplied to `PacketGet`. |
lengthOut | dynamic | — | Length out value supplied to `PacketGet`. |
function PacketSend(sock, node, data, length)Legacy compatibility stub; callers must submit structured Doom packets through I_NetCmd.
| Parameter | Type | Default | Description |
|---|---|---|---|
sock | dynamic | — | Sock value supplied to `PacketSend`. |
node | dynamic | — | Node value supplied to `PacketSend`. |
data | dynamic | — | Binary or structured data to process. |
length | dynamic | — | Number of bytes or elements in the associated value. |
function UDPsocket()Legacy compatibility stub; sockets are owned exclusively by mp_platform and no raw handle is exposed.