BytesSent

Returns the number of bytes written. If negative, an error occurred. The values that can be returned are:

Code Description
>=0 Successful send a datagram with a payload of this many bytes. (It is possible to send a UDP datagram of 0 bytes that will just include the UDP header.)
-1 Failed to send. (Network interface may be down.)
-2 Socket not initialized or was closed. (The only way this will be closed is if you call UDPSocketClose.)
-3  Invalid IP address.
-4 Invalid PayloadLen.
-5 Failed to allocate send buffer.

-6

Invalid SocketID.

Type: Variable of type Long