###Function###
TCPSend

###Description###
Sends data on a connected socket.

###Syntax###
TCPSend ( mainsocket, data )


###Parameters###
@@ParamTable@@
mainsocket
	The connected socket identifier (SocketID) as returned by a <a href="TCPConnect.htm">TCPConnect</a> function.
data
	binary/string to be send to the connected socket.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	the number of bytes sent to the connected socket.
Failure:	0 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###
If Unicode strings need to be transmitted they must be encoded/decoded with <a href="StringToBinary.htm">StringToBinary()</a>/<a href="BinaryToString.htm">BinaryToString()</a>.


###Related###
StringToBinary, TCPConnect, TCPListen, TCPRecv, TCPStartup, TCPTimeout (Option)


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