#include <rtl.h>
BOOL tcp_send (
U8 socket, /* TCP socket to send the data packet from. */
U8* buf, /* Pointer to buffer containing the data to send. */
U16 dlen ); /* Number of bytes of data to send. */
Description
The tcp_send function sends the data packet to a remote
machine. The argument socket specifies the socket handle to
use for communication on the local machine.
The argument buf points to the constructed TCP data packet.
The argument dlen specifies the number of bytes in the data
packet to send.
If the tcp_send fails to send the data, it releases the
memory buffer specified with the argument buf and returns.
This function can not send the data when:
the TCP connection is not established
the previously sent data is not acknowledged from the remote
machine.
The tcp_send function is in the RL-TCPnet library. The
prototype is defined in rtl.h.
note
You must allocate the memory using tcp_get_buf before
calling tcp_send.
The socket must already be open and connected for
communication.
It is not allowed to call tcp_send from the callback
function of the socket.
Return Value
The tcp_send function returns __TRUE when the TCP packet
has been sent successfully. Otherwise, the function returns
__FALSE.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.