sockSend (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


Sends data on a socket. A connection must be established before any data can be sent.

 

 

Input:                

id : SINT

ID of the connection.

 

data : PTR

Address of the buffer that contains the data to be sent.

 

size : INT

Number of bytes to send from the buffer.

 

Returns: INT

Number of bytes that were sent on the socket. This can be less than the requested number of bytes if the data has only partially been sent.

 

 

Declaration:

FUNCTION sockSend : INT;
VAR_INPUT
  id   : SINT; // ID of the connection.
  data : PTR; // Address of the buffer to send
  size : INT; // Number of bytes to send
END_VAR;

 

 


Example:

 

Please see the "Examples - Socket Communication"