Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qnativesocketengine_win.cpp File Reference
#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 dependency graph for qnativesocketengine_win.cpp:

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)
 

Macro Definition Documentation

◆ _WSAIOW

#define _WSAIOW (   x,
  y 
)    (IOC_IN|(x)|(y))

Definition at line 252 of file qnativesocketengine_win.cpp.

◆ AF_INET6

#define AF_INET6   23 /* Internetwork Version 6 */

Definition at line 100 of file qnativesocketengine_win.cpp.

◆ IOC_VENDOR

#define IOC_VENDOR   0x18000000

Definition at line 249 of file qnativesocketengine_win.cpp.

◆ IP_HOPLIMIT

#define IP_HOPLIMIT   21

Definition at line 33 of file qnativesocketengine_win.cpp.

◆ IPV6_V6ONLY

#define IPV6_V6ONLY   27

Definition at line 30 of file qnativesocketengine_win.cpp.

◆ SIO_UDP_CONNRESET

#define SIO_UDP_CONNRESET   _WSAIOW(IOC_VENDOR,12)

Definition at line 254 of file qnativesocketengine_win.cpp.

◆ SO_EXCLUSIVEADDRUSE

#define SO_EXCLUSIVEADDRUSE   ((int)(~SO_REUSEADDR)) /* disallow local address reuse */

Definition at line 104 of file qnativesocketengine_win.cpp.

◆ WS_ERROR_DEBUG

#define WS_ERROR_DEBUG (   x)    Q_UNUSED(x)

Definition at line 95 of file qnativesocketengine_win.cpp.

◆ WSA_FLAG_NO_HANDLE_INHERIT

#define WSA_FLAG_NO_HANDLE_INHERIT   0x80

Function Documentation

◆ convertToLevelAndOption()

◆ multicastMembershipHelper()

static bool multicastMembershipHelper ( QNativeSocketEnginePrivate d,
int  how6,
int  how4,
const QHostAddress groupAddress,
const QNetworkInterface iface 
)
static

◆ qt_socket_getPortAndAddress()

static void qt_socket_getPortAndAddress ( SOCKET  socketDescriptor,
const qt_sockaddr sa,
quint16 port,
QHostAddress address 
)
inlinestatic

Definition at line 111 of file qnativesocketengine_win.cpp.

References qt_sockaddr::a, qt_sockaddr::a4, qt_sockaddr::a6, AF_INET6, i, and QString::number().

+ Here is the call graph for this function:

◆ qt_socket_getType()

static QAbstractSocket::SocketType qt_socket_getType ( qintptr  socketDescriptor)
inlinestatic

◆ setErrorFromWSAError()