www.beck-ipc.com

@CHIP-RTOS C Library V2.00 - TCP/IP API


send

Transmit a message.

int send ( int sd, const char far *bufptr, int bufLen,
           int flags, int *error );

Parameters

sd

Socket descriptor.

bufptr

Pointer to output buffer containing data to be transmitted.

bufLen

Maximum characters to output from bufptr .

flags

Wait options:
  MSG_BLOCKING - Wait for data send to complete
  MSG_DONTWAIT - Don't wait for data send to complete

error

Output parameter:  Failure code, 0 on success.

Return Value

-1: Failure, see error value reported
else count of bytes transfered into the socket send queue.

Comments

This API function applies only to TCP sockets.   It transmits a message to another transport end-point.   It may be used only if the socket is in a connected state.

The MSG_BLOCKING mode will not work if the socket has been put into non-blocking mode using the Set_Blocking_Mode API.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.


This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document