###Function###
TCPAccept

###Description###
Permits an incoming connection attempt on a socket.

###Syntax###
TCPAccept ( mainsocket )


###Parameters###
@@ParamTable@@
mainsocket
	The main socket identifier (SocketID) as returned by a <a href="TCPListen.htm">TCPListen</a> function.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	the connected socket identifier.
Failure:	-1 and sets the @error flag to non-zero.
@error:	windows API WSAGetError return value (see <a href="http://msdn.microsoft.com/en-us/library/ms740668.aspx">MSDN</a>).
@@End@@


###Remarks###
None.


###Related###
TCPCloseSocket, TCPListen, TCPRecv, TCPStartup, TCPTimeout (Option)


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