Jump to main content

##

# NET_PRES_SocketWriteIsReady Function

## C

    uint16_t NET_PRES_SocketWriteIsReady(NET_PRES_SKT_HANDLE_T handle, uint16_t reqSize, uint16_t minSize);

## Returns

The number of bytes available in the TX buffer:

- >= reqSize - If the requested space is available in the output buffer

- >= minSize - I there's at least this minimum space (minSize != 0)

- 0 - Requested (minimum) space cannot be granted

## Description

This function calls the transport or the encryption layer's WriteIsReady, if it exists.

## Preconditions

A socket needs to have been opened by NET_PRES_SocketOpen.

## Parameters

Parameters | Description
--- | ---
handle | Presentation layer socket handle.
reqSize | Write size to check for.
minSize | Minimum size that could be guaranteed. Could be '0' if not needed.