Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.

FreeRTOS_maywrite()

[FreeRTOS-Plus-TCP API Reference]

FreeRTOS_sockets.h
BaseType_t FreeRTOS_maywrite( Socket_t xSocket );
		

Returns the number of bytes that can be added to a TCP socket's Tx stream before the Tx stream is full.

Parameters:

xSocket   The socket being queried.

Returns:

If the socket referenced by the xSocket parameter is not a TCP socket then -pdFREERTOS_ERRNO_EINVAL is returned.

If the socket is not in a state that allows data to be sent (for example it is in the Listening state or is in the process of being shut down) then -1 is returned.

If the socket is in the Established the returned value is the number of bytes that can be added to the socket's Tx stream.

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.