NWMUDS:GetConnectionStatus

NWMUDS:GetConnectionStatus

Request #

Index WordDescription
0Header code [0x000B0000]

Response #

Index WordDescription
0Header code
1Result code
2-13Output 0x30-byte structure.

Output structure #

OffsetSizeDescription
0x00x4u32 status
0x40x4Unknown u32. Official user-processes check for values: 0x0, 0x1, and non-zero.
0x80x2u16 NetworkNodeID for this device. This is the broadcast alias when connected as a spectator.
0xA0x2u16, changed_nodes. This is a bitmask of the nodes that changed and triggered the update.
0xC0x20u16 nodes[16]. Array of NetworkNodeIds, the values inside this array is what’s passed to NWMUDS:GetNodeInformation.
0x2C0x1u8 total_nodes.
0x2D0x1u8 max_nodes, originally from the NetworkStruct.
0x2E0x2u16 node_bitmask. This is a bitmask of NetworkNodeIDs: bit0 for NetworkNodeID 0x1(host), bit1 for NetworkNodeID 0x2(first original client), and so on.

Right after initializing, this structure is all-zero except for the status which is value 0x3.

Status values #

TypeDescription
0x3Not connected to any network as a host/client, or just initialized.
0x6Connected to a network as a host.
0x9Connected to a network as a client.
0xAConnected to a network as a spectator.
0xBFor this value official user-processes use NWMUDS:UpdateNetworkAttribute to clear attributes bitmask 0x6.

Description #

This is mainly used when the event handle from NWMUDS:Initialize is signaled. This is also used before using NWMUDS:Bind. For certain user-processes this may be used during NWMUDS initialization as well.

The event is not signaled when using NWMUDS:DestroyNetwork or NWMUDS:DisconnectNetwork. However the event does get signaled when creating or connecting to a network.