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

NET Init

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:52, 29 April 2007 (edit)
Sandman (Talk | contribs)
(NET Init moved to Net init)
← Previous diff
Current revision (13:07, 21 August 2008) (edit) (undo)
Sandman (Talk | contribs)
m (Notes)
 
(5 intermediate revisions not shown.)
Line 1: Line 1:
-#REDIRECT [[Net init]]+[[Category:functions]]
 +[[Category:networkdll]]
 +[[Category:dll]]
 + 
 +[[Functioncategory:Networkdll|'''Up to Network.DLL Functions''']]
 +----
 + 
 + 
 +== Definition ==
 +'''INT''' NET_Init ( <'''INT''' timeout> , <'''WORD''' maxconnections> , <'''WORD''' maxlistenports> )
 + 
 +Initializes [[Network_DLL|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''' : [[NET_ERRORCODES|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 variable]]s (before calling NET_Init()):
 +* word NET.MaxConnections
 +* word NET.MaxListenPorts
 +* word NET.ActiveConnections
 +* word NET.ActiveListenPorts
 +* byte NET.ConsoleReports
 + 
 +== Example ==
 +<pre>
 +Program example;
 + include "Network.fh";
 +Begin
 + 
 + NET_Init(0,10,1);
 +
 + Loop
 + frame;
 + End
 + 
 +End
 +</pre>
 + 
 +{{Netfuncbox}}

Current revision

Up to Network.DLL Functions



Contents

[edit] Definition

INT NET_Init ( <INT timeout> , <WORD maxconnections> , <WORD maxlistenports> )

Initializes Network.DLL.

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

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

[edit] Notes

Also consider (initializing) the following Global variables (before calling NET_Init()):

  • word NET.MaxConnections
  • word NET.MaxListenPorts
  • word NET.ActiveConnections
  • word NET.ActiveListenPorts
  • byte NET.ConsoleReports

[edit] Example

Program example;
    include "Network.fh";
Begin

    NET_Init(0,10,1);
   
    Loop
        frame;
    End

End


Network.DLL Functions
Global NET_Init() • NET_Quit() • NET_Version() • NET_IntVersion() • NET_About() • NET_GetError() • NET_Stat_Buffer() • NET_IntToIP() • NET_IPToInt()
Connections NET_Connect() • NET_Listen() • NET_Disconnect() • NET_DisconnectAll()
Connection NET_Resolve() • NET_Hostname() • NET_IPAddress() • NET_Port() • NET_Separator() • NET_GetSeparator() • NET_GetSeparatorLength()
Transfer NET_Recv() • NET_RecvFile() • NET_RecvGraph() • NET_RecvVar() • NET_Send() • NET_SendFile() • NET_SendGraph() • NET_SendRN() • NET_SendVar()
Personal tools