TCPIP_HTTP_NET_ConnectionRead Function

C

uint16_t TCPIP_HTTP_NET_ConnectionRead(
    TCPIP_HTTP_NET_CONN_HANDLE connHandle, 
    void * buffer, 
    uint16_t size
);

Description

This function reads an array of data bytes from the connection RX buffer. The data is removed from the FIFO in the process.

Preconditions

connHandle - a valid HTTP connection.

Parameters

ParametersDescription
connHandleConnection handle.
bufferThe pointer to the array to store data that was read.
sizeThe number of bytes to read.

Returns

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

Remarks

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