If the connect operation succeeded then 0 is returned.
If xSocket is not a valid TCP socket then -pdFREERTOS_ERRNO_EBADF is returned.
If xSocket was already connected before FreeRTOS_connect() was called then -pdFREERTOS_ERRNO_EISCONN is returned.
If xSocket is not in a state that allows a connect operation then either -pdFREERTOS_ERRNO_EINPROGRESS or -pdFREERTOS_ERRNO_EAGAIN is returned.
If the socket has a read block time of zero and the connect operation cannot succeed immediately then -pdFREERTOS_ERRNO_EWOULDBLOCK is returned.
If the connect attempt times out then -pdFREERTOS_ERRNO_ETIMEDOUT is returned.
Note that, because FreeRTOS does not implement errno, the behaviour in the presence of an error is necessarily different to that of connect() functions that are fully compliant with the expected Berkeley sockets behaviour.
See the Sending TCP Data section of the FreeRTOS+TCP networking tutorial pages.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.