If the shutdown request was successful then 0 is returned. The shutdown being complete is indicated by FreeRTOS_recv() calls on the socket resulting in FREERTOS_EINVAL being returned.
If xSocket is not a valid TCP socket then -pdFREERTOS_ERRNO_EOPNOTSUPP is returned.
If xSocket is a valid TCP socket but the socket is not connected to a remote socket then -pdFREERTOS_ERRNO_EOPNOTSUPP 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.