This wiki is out of date, use the continuation of this wiki instead

NET Globals

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 13:22, 4 November 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Revision as of 13:33, 4 November 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 57: Line 57:
NET_STATUS_DISCONNECTING, NET_STATUS_DISCONNECTED, NET_STATUS_INACTIVE, NET_STATUS_CONNECTED, NET_STATUS_CONNECTING. NET_STATUS_DISCONNECTING, NET_STATUS_DISCONNECTED, NET_STATUS_INACTIVE, NET_STATUS_CONNECTED, NET_STATUS_CONNECTING.
-The status array tells the current status, while the incoming array tell the change of status. For example, if a connection would disconnect, the element of the incoming array of that connection would become NET_STATUS_DISCONNECT for one frame and then become NET_STATUS_INACTIVE.+The status array tells the current status of each connection, while the incoming array tells the change of status of each connection. For example, if a connection would disconnect, the element of the incoming array of that connection would become NET_STATUS_DISCONNECT for one cycle and then become NET_STATUS_INACTIVE.
 + 
 +For the incoming array:
 +* NET_STATUS_DISCONNECTED lasts one cycle
 +* NET_STATUS_INACTIVE lasts until a different status is valid
 +* NET_STATUS_ACTIVE lasts until all messages are collected or a higher priority status is triggered
 +* NET_STATUS_ESTABLISHED lasts one cycle

Revision as of 13:33, 4 November 2007

Up to Network.DLL



Struct NET

INT Activity - true/false: whether there is an incoming message on a connection. READ ONLY
INT POINTER Incoming - The change of state of each connection. READ ONLY
INT POINTER Status - The status of each connection. READ ONLY
WORD MaxConnections - Maximum number of connections specified when NET_Init was called. READ ONLY
WORD MaxListenPorts - Maximum number of listenports specified when NET_Init was called. READ ONLY
WORD ActiveConnections - Number of currently active Connections; this does not include ListenConnections. READ ONLY
WORD ActiveListenPorts - Number of currently active ListenConnections. READ ONLY
BYTE ConsoleReports = false - true/false: whether general messages should be displayed in the console. READ/WRITE
BYTE ReturnNETDLLCommands = false - true/false: whether Network.DLL commands are visible to Fenix. READ/WRITE Deprecated
INT totaltransferrate_up - The number of bytes sent this frame by all connections.
INT totaltransferrate_down - The number of bytes received this frame by all connections.
INT totaltransferred_up - The total number of bytes sent by all connections.
INT totaltransferred_down - The total number of bytes received by all connections.
INT POINTER transferrate_up - The number of bytes sent this frame by a connection.
INT POINTER transferrate_down - The number of bytes received this frame by a connection.
INT POINTER transferred_up - The total number of bytes sent by a connection.
INT POINTER transferred_down - The total number of bytes received by a connection.

Pointers

To the int pointers in the NET struct applies the following:

  • they point to an array with number of elements equal to NET.MaxConnections;
  • each element contains data regarding one connection;
  • every connection has a NetID and this NetID corresponds with the position in the array (so for example for the NetID n: NET.Status[n] works).

Incoming/Status

To the incoming array the following status codes apply: NET_STATUS_DISCONNECTED, NET_STATUS_INACTIVE, NET_STATUS_ACTIVE, NET_STATUS_CONNECTED.

To the status array the following status codes apply: NET_STATUS_DISCONNECTING, NET_STATUS_DISCONNECTED, NET_STATUS_INACTIVE, NET_STATUS_CONNECTED, NET_STATUS_CONNECTING.

The status array tells the current status of each connection, while the incoming array tells the change of status of each connection. For example, if a connection would disconnect, the element of the incoming array of that connection would become NET_STATUS_DISCONNECT for one cycle and then become NET_STATUS_INACTIVE.

For the incoming array:

  • NET_STATUS_DISCONNECTED lasts one cycle
  • NET_STATUS_INACTIVE lasts until a different status is valid
  • NET_STATUS_ACTIVE lasts until all messages are collected or a higher priority status is triggered
  • NET_STATUS_ESTABLISHED lasts one cycle
Personal tools