- This wiki is out of date, use the continuation of this wiki instead
Net init
From FenixWiki
(Difference between revisions)
| Revision as of 00:16, 16 April 2007 (edit) Sandman (Talk | contribs) m (→Notes) ← Previous diff |
Revision as of 10:13, 18 April 2007 (edit) (undo) Sandman (Talk | contribs) m Next diff → |
||
| Line 2: | Line 2: | ||
| [[Category:networkdllfunctions]] | [[Category:networkdllfunctions]] | ||
| - | ==Definition== | + | == Definition == |
| - | + | '''INT''' NET_Init ( <'''INT''' timeout> , <'''WORD''' maxconnections> , <'''WORD''' maxlistenports> ) | |
| - | '''INT''' NET_Init ( '''INT''' timeout , '''WORD''' maxconnections , '''WORD''' maxlistenports ) | + | |
| Initializes [[Network_DLL|Network.DLL]].<br /> | Initializes [[Network_DLL|Network.DLL]].<br /> | ||
| - | |||
| == Parameters == | == Parameters == | ||
| - | |||
| {| | {| | ||
| | '''INT''' timeout || Milliseconds to wait for messages each frame. (0 is the best thing, really) | | '''INT''' timeout || Milliseconds to wait for messages each frame. (0 is the best thing, really) | ||
| Line 18: | Line 15: | ||
| | '''WORD''' maxlistenports || Maximum number of ports on which can be listened for connections. | | '''WORD''' maxlistenports || Maximum number of ports on which can be listened for connections. | ||
| |} | |} | ||
| - | |||
| == Returns == | == Returns == | ||
| - | |||
| '''INT''' : [[NET_ERRORCODES|Network.DLL Errorcode]] | '''INT''' : [[NET_ERRORCODES|Network.DLL Errorcode]] | ||
| {| | {| | ||
| Line 34: | Line 29: | ||
| | NET_ERROR_NONE || No error. | | NET_ERROR_NONE || No error. | ||
| |} | |} | ||
| - | |||
| == Notes == | == Notes == | ||
| - | |||
| Also consider (initializing) the following [[Global variable]]s (before calling NET_Init()): | Also consider (initializing) the following [[Global variable]]s (before calling NET_Init()): | ||
| * word NET.MaxConnections | * word NET.MaxConnections | ||
| Line 47: | Line 40: | ||
| == Example == | == Example == | ||
| - | |||
| <pre> | <pre> | ||
| Program example; | Program example; | ||
Revision as of 10:13, 18 April 2007
Contents |
Definition
INT NET_Init ( <INT timeout> , <WORD maxconnections> , <WORD maxlistenports> )
Initializes Network.DLL.
Parameters
| INT timeout | Milliseconds to wait for messages each frame. (0 is the best thing, really) |
| WORD maxconnections | Maximum number of connections. |
| WORD maxlistenports | Maximum number of ports on which can be listened for connections. |
Returns
INT : Network.DLL Errorcode
| NET_ERROR_ALREADYINIT | Network.DLL already initialized. |
| NET_ERROR_INITIALIZATION | Error during initialization. |
| NET_ERROR_TOOFEWCONNS | Too small number of maximum connections |
| NET_ERROR_TOOMANYLISTENERS | Too many listenports specified. |
| NET_ERROR_NONE | No error. |
Notes
Also consider (initializing) the following Global variables (before calling NET_Init()):
- word NET.MaxConnections
- word NET.MaxListenPorts
- word ActiveConnections
- word ActiveListenPorts
- byte NET.ConsoleReports
- byte NET.ReturnNETDLLCommands
Example
Program example;
include "Network.fh";
Begin
NET_Init(0,10,1);
Loop
frame;
End
End
