The following list of macros are used to define the possible error codes.
Errors are listed in numerical order with the error macro name.
Macros | |
#define | SOCK_ERR_ADDR_ALREADY_IN_USE -2 |
#define | SOCK_ERR_ADDR_IS_REQUIRED -11 |
#define | SOCK_ERR_BUFFER_FULL -14 |
#define | SOCK_ERR_CONN_ABORTED -12 |
#define | SOCK_ERR_INVALID -9 |
#define | SOCK_ERR_INVALID_ADDRESS -1 |
#define | SOCK_ERR_INVALID_ARG -6 |
#define | SOCK_ERR_MAX_LISTEN_SOCK -7 |
#define | SOCK_ERR_MAX_TCP_SOCK -3 |
#define | SOCK_ERR_MAX_UDP_SOCK -4 |
#define | SOCK_ERR_NO_ERROR 0 |
#define | SOCK_ERR_TIMEOUT -13 |
#define SOCK_ERR_ADDR_ALREADY_IN_USE -2 |
Socket operation cannot bind on the given address. Only one IP address per socket, and one socket per IP address is permitted - any attempt for a new socket to bind with an IP address already bound to another open socket will return the following error code.
#define SOCK_ERR_ADDR_IS_REQUIRED -11 |
Destination address is required. Failure to provide the socket address required for the socket operation to be completed. The sendto function requires a destination address to send data.
#define SOCK_ERR_BUFFER_FULL -14 |
No buffer space available to be used for the requested socket operation.
Referenced by IperfSocketEventHandler(), IperfTCP_SendTestPacket(), IperfUDP_SendTestPacket(), recv(), recvfrom(), send(), and sendto().
#define SOCK_ERR_CONN_ABORTED -12 |
The socket is closed (reset) by the peer. If this error is received, the application should call close().
#define SOCK_ERR_INVALID -9 |
The requested socket operation is not valid in the current socket state. For example: accept is called on a TCP socket before bind or listen.
Referenced by bind(), close(), connect(), gethostbyname(), listen(), rawSetSockOpt(), secure(), and setsockopt().
#define SOCK_ERR_INVALID_ADDRESS -1 |
Socket address is invalid. The socket operation cannot be completed successfully without specifying a valid address For example: bind is called without specifying a port number
#define SOCK_ERR_INVALID_ARG -6 |
An invalid argument is passed to a socket function. Identifies that socket operation failed
Referenced by accept(), bind(), close(), connect(), get_alpn_index(), get_error_detail(), gethostbyname(), getsockopt(), listen(), rawSetSockOpt(), recv(), recvfrom(), secure(), send(), sendto(), set_alpn_list(), setsockopt(), and sslSetSockOpt().
#define SOCK_ERR_MAX_LISTEN_SOCK -7 |
Exceeded the maximum number of TCP passive listening sockets. Identifies that listen operation failed.
#define SOCK_ERR_MAX_TCP_SOCK -3 |
Exceeded the maximum number of TCP sockets. A maximum number of TCP sockets opened simultaneously is defined through TCP_SOCK_MAX. It is not permitted to exceed that number at socket creation. Identifies that socket operation failed.
#define SOCK_ERR_MAX_UDP_SOCK -4 |
Exceeded the maximum number of UDP sockets. A maximum number of UDP sockets opened simultaneously is defined through UDP_SOCK_MAX. It is not permitted to exceed that number at socket creation. Identifies that socket operation failed
#define SOCK_ERR_NO_ERROR 0 |
Successful socket operation. This code is also used with event SOCKET_MSG_RECV if a socket connection is closed. In that case, the application should call close().
Referenced by accept(), bind(), close(), connect(), get_error_detail(), gethostbyname(), listen(), m2m_ip_cb(), rawSetSockOpt(), recv(), recvfrom(), secure(), send(), sendto(), setsockopt(), and sslSetSockOpt().
#define SOCK_ERR_TIMEOUT -13 |
The socket pending operation has timed out. The socket remains open.