###Function###
TCPListen

###Description###
Creates a socket listening for an incoming connection.


###Syntax###
TCPListen ( IPAddr, port [, MaxPendingConnection] )


###Parameters###
@@ParamTable@@
IPAddr
	Internet Protocol dotted address(IpV4) as "192.162.1.1".
port
	port on which the created socket will be connected.
MaxPendingConnection
	Maximum length of the queue of pending connections. By default the maximun reasonable value will be set.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	Returns main socket identifier.
Failure:	Returns -1 and set @error according to Windows API WSAGetLasterror return.
	If IPAddr is incorrect @error is set to 1.
	If  port  is incorrect @error is set to 2.
@@End@@


###Remarks###
None.

###Related###
TCPStartup, TCPConnect, TCPAccept, TCPTimeout (Option)


###Example###
@@IncludeExample@@
