Jump to main content

##

# TCPIP_TCP_Peek Function

## C

    uint8_t TCPIP_TCP_Peek(
        TCP_SOCKET hTCP,
        uint16_t wStart
    );

## Description

This function peaks at one byte in the TCP RX buffer/FIFO without removing it from the buffer.

## Preconditions

TCP is initialized.

## Parameters

Parameters | Description
--- | ---
hTCP | The socket to peek from (read without removing from stream).
wStart | Zero-indexed starting position within the FIFO to peek from.

## Remarks

Note that this function is inefficient and its use is discouraged. A buffered approach (TCPIP_TCP_ArrayPeek) is preferred.