Synopsis
CTL_STATUS_t ctl_tcp_get_socket_error(CTL_SOCKET_t soc);
Description

ctl_tcp_get_socket_error returns the error state of the socket soc. If there is no error on the socket, ctl_tcp_get_socket_error returns CTL_NO_ERROR, otherwise one of the following error codes:

CTL_NET_ERR_WOULDBLOCK
The operation cannot be completed without blocking and the application-layer software requested non-blocking operation.
CTL_NET_ERR_ALREADY
The requested operation has already been performed.
CTL_NET_ERR_NOTSOCK
Invalid socket descriptor.
CTL_NET_ERR_OPNOTSUPP
Option not supported.
CTL_NET_ERR_NETDOWN
Network interface is not configured or has a problem at the MAC level.
CTL_NET_ERR_NETUNREACH
Network interface is not connected.
CTL_NET_ERR_CONNABORTED
TCP connection aborted.
CTL_NET_ERR_CONNRESET
TCP connection reset.
CTL_NET_ERR_NOTCONN
Not connected.
CTL_NET_ERR_TIMEDOUT
Timed out.
CTL_NET_ERR_CONNREFUSED
The remote TCP refused our connection attempt.
CTL_NET_ERR_HOSTUNREACH
The remote host does not respond.
CTL_NET_ERR_NOTEMPTY
A TCP connect call was made on a socket is already connected.
CTL_NET_ERR_DISCON
The socket was disconnected: no further communication is possible.