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:36, 4 November 2007 (edit)
Sandman (Talk | contribs)
m (Struct NET)
← Previous diff
Current revision (00:12, 21 November 2007) (edit) (undo)
Sandman (Talk | contribs)
m (Incoming/Status)
 
(One intermediate revision not shown.)
Line 62: Line 62:
* NET_STATUS_DISCONNECTED lasts one cycle * NET_STATUS_DISCONNECTED lasts one cycle
* NET_STATUS_INACTIVE lasts until a different status is valid * 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_ACTIVE lasts one cycle
* NET_STATUS_ESTABLISHED lasts one cycle * NET_STATUS_ESTABLISHED lasts one cycle
 +
 +{{Netdocbox}}

Current revision

Up to Network.DLL



[edit] 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 - true/false: whether general messages should be displayed in the console. READ/WRITE
BYTE ReturnNETDLLCommands - 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. READ ONLY
INT totaltransferrate_down - The number of bytes received this frame by all connections. READ ONLY
INT totaltransferred_up - The total number of bytes sent by all connections. READ ONLY
INT totaltransferred_down - The total number of bytes received by all connections. READ ONLY
INT POINTER transferrate_up - The number of bytes sent this frame by a connection. READ ONLY
INT POINTER transferrate_down - The number of bytes received this frame by a connection. READ ONLY
INT POINTER transferred_up - The total number of bytes sent by a connection. READ ONLY
INT POINTER transferred_down - The total number of bytes received by a connection. READ ONLY

[edit] 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).

[edit] 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 one cycle
  • NET_STATUS_ESTABLISHED lasts one cycle


Network.DLL Documentation
MainFunctionsGlobalsDefinesErrorcodesChangelog
Personal tools