- This wiki is out of date, use the continuation of this wiki instead
 
NET Listen
From FenixWiki
(Difference between revisions)
												
			
			| Revision as of 15:12, 24 July 2007 (edit) Sandman (Talk | contribs) m (→Example) ← Previous diff  | 
				Revision as of 15:14, 24 July 2007 (edit) (undo) Sandman (Talk | contribs) m (→Returns) Next diff →  | 
			||
| Line 19: | Line 19: | ||
| == Returns == | == Returns == | ||
| - | INT : Connection identifier. | + | '''INT''' : Connection identifier. | 
| {| | {| | ||
| | NET_ERROR_INVALIDSOCKETSET || - The socketset is invalid. | | NET_ERROR_INVALIDSOCKETSET || - The socketset is invalid. | ||
Revision as of 15:14, 24 July 2007
Contents | 
Definition
INT NET_Listen ( <WORD port> , [<BYTE consolereports>] )
Opens a listenconnection on a certain port. The connections accepted will inherit certain variables from the listenport they were connected on. These variables are consolereports and separator.
Parameters
| WORD port | - The port on which to listen. | 
| [BYTE consolereports] | - true/false: specifies whether there will be console reports for this connection (like messages). | 
Returns
INT : Connection identifier.
| NET_ERROR_INVALIDSOCKETSET | - The socketset is invalid. | 
| NET_ERROR_SOCKETSETINACTIVE | - The socketset is inactive. | 
| NET_ERROR_INVALIDPORTNUMBER | - The portnumber is invalid (<0 or >65535). | 
| NET_ERROR_INVALIDTYPE | - The type specified is invalid. | 
| NET_ERROR_TOOMANYCONNS | - There are too many connections | 
| NET_ERROR_RESOLVINGHOST | - Could not resolve host. | 
| NET_ERROR_LISTENINGONCONN | - Could not listen on connection. | 
| NET_ERROR_ADDINGSOCKET | - Could not add socket to socketset. | 
| 0 - n | - Connection identifier. (Where n is the number of maximum allowed connections) | 
Example
Program example;
    include "Network.fh";
Begin
    NET_Init(0,10,1);
    NET_Listen(4555,true);
   
    Loop
        frame;
    End
End
						
			
		