SendNetworkData()

Syntax

Result = SendNetworkData(Connection, *MemoryBuffer, Length)
Description
Sends raw data to the specified client. This function can be used by both client and server applications.

Parameters

Connection The connection to send data to. On the server side, 'Connection' is the client which should receive this data. On the client side, 'Connection' is returned by OpenNetworkConnection().
*MemoryBuffer The address of the data to send.
Length The length of the data to send.

Return value

Returns the number of bytes actually sent. If the number of bytes returned is not equal to the 'Length' parameter the receiving buffer of the user is probably full. If nothing could be sent then 'Result' will equal -1.

Remarks

On UDP connections, the maximum 'Length' is 2048. On TCP connections, the maximum 'Length' is 65536.

See Also

SendNetworkString()

Supported OS

All

<- ReceiveNetworkData() - Network Index - SendNetworkString() ->