NWMUDS:GetConnectionStatus: Difference between revisions

Subv (talk | contribs)
 
(8 intermediate revisions by 2 users not shown)
Line 42: Line 42:
| 0x8
| 0x8
| 0x2
| 0x2
| u16 NetworkNodeID for this device.
| u16 NetworkNodeID for this device. This is the broadcast alias when connected as a spectator.
|-
|-
| 0xA
| 0xA
| 0x22
| 0x2
| ?
| u16, changed_nodes. This is a bitmask of the nodes that changed and triggered the update.
|-
| 0xC
| 0x20
| u16 nodes[16]. Array of NetworkNodeIds, the values inside this array is what's passed to [[NWMUDS:GetNodeInformation]].
|-
|-
| 0x2C
| 0x2C
Line 60: Line 64:
| u16 node_bitmask. This is a bitmask of NetworkNodeIDs: bit0 for NetworkNodeID 0x1(host), bit1 for NetworkNodeID 0x2(first original client), and so on.
| u16 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 [[NWMUDS:InitializeWithVersion|initializing]], this structure is all-zero except for the status which is value 0x3.


==Status values==
==Status values==
Line 68: Line 74:
|-
|-
| 0x3
| 0x3
| Not connected to any network as a host/client.
| Not connected to any network as a host/client, or just initialized.
|-
|-
| 0x6
| 0x6
Line 78: Line 84:
| 0xA
| 0xA
| Connected to a network as a spectator.
| Connected to a network as a spectator.
|-
| 0xB
| For this value official user-processes use [[NWMUDS:UpdateNetworkAttribute]] to clear attributes bitmask 0x6.
|}
|}


=Description=
=Description=
This is mainly used when the event handle from [[NWMUDS:Initialize]] is signalled. This is also used before using [[NWMUDS:Bind]]. For certain user-processes this may be used during NWMUDS initialization as well.
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.