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

NET Globals

From FenixWiki

(Difference between revisions)
Jump to: navigation, search

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...)
Next diff →

Revision as of 13:04, 4 November 2007

Contents

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. (default is frame;)

Connection Status codes

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

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, 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.

Personal tools