v1.3.0.0
Socket Namespace Reference

Description

The Socket namespace contains constants relating to network socket operations.

Enumerations

enum  SocketError
 

Enumeration Type Documentation

◆ SocketError

Error code value constants. These values correspond to the code property of errors emitted in the error event and the value returned for the errorCode property.

Enumerator
ConnectionRefusedError 

( 0) The connection was refused by the peer (or timed out).

RemoteHostClosedError 

( 1) The remote host closed the connection.

Note that the client socket (i.e., this socket) will be closed after the remote close notification has been sent.

HostNotFoundError 

( 2) The host address was not found.

SocketAccessError 

( 3) The socket operation failed because the application lacked the required privileges.

SocketResourceError 

( 4) The local system ran out of resources (e.g., too many sockets).

SocketTimeoutError 

( 5) The socket operation timed out.

DatagramTooLargeError 

( 6) The datagram was larger than the operating system's limit (which can be as low as 8192 bytes).

NetworkError 

( 7) An error occurred with the network (e.g., the network cable was accidentally plugged out).

AddressInUseError 

( 8) The address specified to bind() is already in use and was set to be exclusive.

SocketAddressNotAvailableError 

( 9) The address specified to QAbstractSocket::bind() does not belong to the host.

UnsupportedSocketOperationError 

(10) The requested socket operation is not supported by the local operating system (e.g., lack of IPv6 support).

UnfinishedSocketOperationError 

(11) The last operation attempted has not finished yet (still in progress in the background).

ProxyAuthenticationRequiredError 

(12) The socket is using a proxy, and the proxy requires authentication.

SslHandshakeFailedError 

(13) The SSL/TLS handshake failed, so the connection was closed (only used in QSslSocket)

ProxyConnectionRefusedError 

(14) Could not contact the proxy server because the connection to that server was denied

ProxyConnectionClosedError 

(15) The connection to the proxy server was closed unexpectedly (before the connection to the final peer was established)

ProxyConnectionTimeoutError 

(16) The connection to the proxy server timed out or the proxy server stopped responding in the authentication phase.

ProxyNotFoundError 

(17) The proxy address set with setProxy() (or the application proxy) was not found.

ProxyProtocolError 

(18) The connection negotiation with the proxy server failed, because the response from the proxy server could not be understood.

OperationError 

(19) An operation was attempted while the socket was in a state that did not permit it.

SslInternalError 

(20) The SSL library being used reported an internal error.

This is probably the result of a bad installation or misconfiguration of the library.

SslInvalidUserDataError 

(21) Invalid data (certificate, key, cypher, etc.) was provided and its use resulted in an error in the SSL library.

TemporaryError 

(22) A temporary error occurred (e.g., operation would block and socket is non-blocking).

UnknownSocketError 

(-1) An unidentified error occurred.