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:04, 4 November 2007 (edit)
Sandman (Talk | contribs)
(New page: == Defines == === General === {| || NET_MAX_MSG_LEN || - Maximum number of bytes per message. (doesn't really apply, ignore it) |- || NET_FPS || - The frame percentage of the NET Loop. (de...)
← Previous diff
Current revision (00:12, 21 November 2007) (edit) (undo)
Sandman (Talk | contribs)
m (Incoming/Status)
 
(4 intermediate revisions not shown.)
Line 1: Line 1:
-== Defines ==+[[Category:global variables]]
-=== General ===+[[Category:networkdll]]
-{|+[[Category:dll]]
-|| NET_MAX_MSG_LEN || - Maximum number of bytes per message. (doesn't really apply, ignore it)+
-|-+
-|| NET_FPS || - The frame percentage of the NET Loop. (default is frame;)+
-|}+
-=== Connection Status codes ===+[[Networkdll|'''Up to Network.DLL''']]
-{|+----
-|| NET_STATUS_DISCONNECTING || - -4 || - The connection is being disconnected+
-|-+
-|| NET_STATUS_DISCONNECTED || - -2 || - The connection is disconnected.+
-|-+
-|| NET_STATUS_INACTIVE || - 0 || - (The connection is) inactive.+
-|-+
-|| NET_STATUS_ACTIVE || - 1 || - (The connection is) active.+
-|-+
-|| NET_STATUS_ESTABLISHED || - 2 || - The connection is established.+
-|-+
-|| NET_STATUS_ESTABLISHING || - 4 || - The connection is being established.+
-|}+
-=== Console Reports modes === 
-{| 
-|| NET_CONSOLEREPORTS_NO || - [[false]] || - Console reports disabled. 
-|- 
-|| NET_CONSOLEREPORTS_YES || - [[true]] || - Console reports enabled. 
-|} 
== Struct NET == == Struct NET ==
Line 45: Line 23:
|| '''WORD''' ActiveListenPorts || - Number of currently active 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''' ConsoleReports || - [[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'''+|| '''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.+|| '''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.+|| '''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.+|| '''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.+|| '''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.+|| '''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.+|| '''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.+|| '''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.+|| '''INT POINTER''' transferred_down || - The total number of bytes received by a connection. READ ONLY
|} |}
Line 79: 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 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