Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <winsock2.h>
#include <ws2tcpip.h>
#include "qnativesocketengine_p_p.h"
#include <qabstracteventdispatcher.h>
#include <qsocketnotifier.h>
#include <qdebug.h>
#include <qdatetime.h>
#include <qnetworkinterface.h>
#include <qoperatingsystemversion.h>
#include <qvarlengtharray.h>
#include <algorithm>
#include <chrono>
Go to the source code of this file.
Macros | |
#define | IPV6_V6ONLY 27 |
#define | IP_HOPLIMIT 21 |
#define | WS_ERROR_DEBUG(x) Q_UNUSED(x) |
#define | AF_INET6 23 /* Internetwork Version 6 */ |
#define | SO_EXCLUSIVEADDRUSE ((int)(~SO_REUSEADDR)) /* disallow local address reuse */ |
#define | IOC_VENDOR 0x18000000 |
#define | _WSAIOW(x, y) (IOC_IN|(x)|(y)) |
#define | SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) |
#define | WSA_FLAG_NO_HANDLE_INHERIT 0x80 |
Functions | |
static void | qt_socket_getPortAndAddress (SOCKET socketDescriptor, const qt_sockaddr *sa, quint16 *port, QHostAddress *address) |
static void | convertToLevelAndOption (QNativeSocketEngine::SocketOption opt, QAbstractSocket::NetworkLayerProtocol socketProtocol, int &level, int &n) |
static QAbstractSocket::SocketType | qt_socket_getType (qintptr socketDescriptor) |
static void | setErrorFromWSAError (int error, QNativeSocketEnginePrivate *d) |
static bool | multicastMembershipHelper (QNativeSocketEnginePrivate *d, int how6, int how4, const QHostAddress &groupAddress, const QNetworkInterface &iface) |
timeval | durationToTimeval (std::chrono::nanoseconds dur) noexcept |
Definition at line 253 of file qnativesocketengine_win.cpp.
#define AF_INET6 23 /* Internetwork Version 6 */ |
Definition at line 101 of file qnativesocketengine_win.cpp.
Referenced by addressFromSockaddr(), addressFromSockaddr(), QNativeSocketEnginePrivate::createNewSocket(), QNativeSocketEnginePrivate::fetchConnectionParameters(), getAddresses(), QHostInfoAgent::lookup(), QNativeSocketEnginePrivate::nativeBind(), qt_socket_getPortAndAddress(), qt_socket_getPortAndAddress(), QHostInfoAgent::reverseLookup(), and QT_BEGIN_NAMESPACE::setSockaddr().
#define IOC_VENDOR 0x18000000 |
Definition at line 250 of file qnativesocketengine_win.cpp.
#define IP_HOPLIMIT 21 |
Definition at line 34 of file qnativesocketengine_win.cpp.
Referenced by convertToLevelAndOption().
#define IPV6_V6ONLY 27 |
Definition at line 31 of file qnativesocketengine_win.cpp.
Referenced by QNativeSocketEnginePrivate::fetchConnectionParameters(), and QNativeSocketEnginePrivate::nativeBind().
#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) |
Definition at line 255 of file qnativesocketengine_win.cpp.
#define SO_EXCLUSIVEADDRUSE ((int)(~SO_REUSEADDR)) /* disallow local address reuse */ |
Definition at line 105 of file qnativesocketengine_win.cpp.
Referenced by convertToLevelAndOption().
Definition at line 96 of file qnativesocketengine_win.cpp.
Referenced by qt_socket_getType().
#define WSA_FLAG_NO_HANDLE_INHERIT 0x80 |
|
static |
Definition at line 143 of file qnativesocketengine_win.cpp.
References QAbstractSocketEngine::AddressReusable, QAbstractSocket::AnyIPProtocol, QAbstractSocketEngine::BindExclusively, QAbstractSocketEngine::BroadcastSocketOption, IP_HOPLIMIT, QAbstractSocket::IPv4Protocol, QAbstractSocket::IPv6Protocol, QAbstractSocketEngine::KeepAliveOption, QAbstractSocketEngine::LowDelayOption, QAbstractSocketEngine::MaxStreamsSocketOption, QAbstractSocketEngine::MulticastLoopbackOption, QAbstractSocketEngine::MulticastTtlOption, QAbstractSocketEngine::NonBlockingSocketOption, opt, QAbstractSocketEngine::PathMtuInformation, QAbstractSocketEngine::ReceiveBufferSocketOption, QAbstractSocketEngine::ReceiveHopLimit, QAbstractSocketEngine::ReceiveOutOfBandData, QAbstractSocketEngine::ReceivePacketInformation, QAbstractSocketEngine::SendBufferSocketOption, SO_EXCLUSIVEADDRUSE, and QAbstractSocketEngine::TypeOfServiceOption.
|
inlinenoexcept |
Definition at line 1432 of file qnativesocketengine_win.cpp.
|
static |
Definition at line 826 of file qnativesocketengine_win.cpp.
References d, QAbstractSocket::IPv4Protocol, QAbstractSocket::IPv6Protocol, QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::NetworkUnreachableErrorString, QNativeSocketEnginePrivate::OperationUnsupportedErrorString, QHostAddress::protocol(), QNativeSocketEnginePrivate::ProtocolUnsupportedErrorString, QHostAddress::toIPv4Address(), and QAbstractSocket::UnsupportedSocketOperationError.
|
inlinestatic |
Definition at line 112 of file qnativesocketengine_win.cpp.
References AF_INET6, i, QString::number(), and QHostAddress::setAddress().
|
inlinestatic |
Definition at line 227 of file qnativesocketengine_win.cpp.
References QAbstractSocket::TcpSocket, QAbstractSocket::UdpSocket, QAbstractSocket::UnknownSocketType, and WS_ERROR_DEBUG.
|
static |
Definition at line 530 of file qnativesocketengine_win.cpp.
References QNativeSocketEnginePrivate::AccessErrorString, QNativeSocketEnginePrivate::AddressInuseErrorString, QNativeSocketEnginePrivate::AddressNotAvailableErrorString, QAbstractSocket::ConnectedState, QAbstractSocket::ConnectingState, QAbstractSocket::ConnectionRefusedError, QNativeSocketEnginePrivate::ConnectionRefusedErrorString, QNativeSocketEnginePrivate::ConnectionTimeOutErrorString, d, error, QNativeSocketEnginePrivate::HostUnreachableErrorString, QNativeSocketEnginePrivate::InvalidSocketErrorString, QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::NetworkUnreachableErrorString, Q_ASSERT, QAbstractSocket::SocketAccessError, QAbstractSocket::UnconnectedState, and QAbstractSocket::UnfinishedSocketOperationError.