1.2.3.1.12 TCPIP_TCP_ArrayGet Function

C

uint16_t TCPIP_TCP_ArrayGet(
    TCP_SOCKET hTCP, 
    uint8_t* buffer, 
    uint16_t count
);

Description

This function reads an array of data bytes from a TCP socket's RX buffer/FIFO. The data is removed from the FIFO in the process.

Preconditions

TCP is initialized.

Parameters

ParametersDescription
hTCPThe socket from which data is to be read.
bufferPointer to the array to store data that was read.
lenNumber of bytes to be read.

Returns

The number of bytes read from the socket. If less than len, the RX FIFO buffer became empty or the socket is not connected.

Remarks

If the supplied buffer is null, the data is simply discarded.