FreeRTOS: Secure Sockets
Return to main page ↑
SOCKETS_Send

Transmit data to the remote socket.

int32_t SOCKETS_Send( Socket_t xSocket,
const void * pvBuffer,
size_t xDataLength,
uint32_t ulFlags );

The socket must have already been created using a call to SOCKETS_Socket() and connected to a remote socket using SOCKETS_Connect().

See the Berkeley Sockets API in wikipedia

Parameters
[in]xSocketThe handle of the sending socket.
[in]pvBufferThe buffer containing the data to be sent.
[in]xDataLengthThe length of the data to be sent.
[in]ulFlagsNot currently used. Should be set to 0.
Returns
  • On success, the number of bytes actually sent is returned.
  • If an error occurred, a negative value is returned. SocketsErrors