Jump to main content

##

# 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

Parameters | Description
--- | ---
hTCP | The socket from which data is to be read.
buffer | Pointer to the array to store data that was read.
len | Number 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.