42 #ifndef QNATIVESOCKETENGINE_P_H 43 #define QNATIVESOCKETENGINE_P_H 55 #include "QtNetwork/qhostaddress.h" 56 #include "private/qabstractsocketengine_p.h" 58 # include "qplatformdefs.h" 60 # include <winsock2.h> 66 # define QT_SS_MAXSIZE 128 67 # define QT_SS_ALIGNSIZE (sizeof(qint64)) 68 # define QT_SS_PAD1SIZE (QT_SS_ALIGNSIZE - sizeof (short)) 69 # define QT_SS_PAD2SIZE (QT_SS_MAXSIZE - (sizeof (short) + QT_SS_PAD1SIZE + QT_SS_ALIGNSIZE)) 99 #ifndef QT_NO_NETWORKINTERFACE 113 int socketDescriptor()
const;
115 bool isValid()
const;
124 #ifndef QT_NO_NETWORKINTERFACE 125 bool joinMulticastGroup(
const QHostAddress &groupAddress,
127 bool leaveMulticastGroup(
const QHostAddress &groupAddress,
133 qint64 bytesAvailable()
const;
142 bool hasPendingDatagrams()
const;
143 qint64 pendingDatagramSize()
const;
145 qint64 bytesToWrite()
const;
147 qint64 receiveBufferSize()
const;
148 void setReceiveBufferSize(
qint64 bufferSize);
150 qint64 sendBufferSize()
const;
151 void setSendBufferSize(
qint64 bufferSize);
156 bool waitForRead(
int msecs = 30000,
bool *timedOut = 0);
157 bool waitForWrite(
int msecs = 30000,
bool *timedOut = 0);
158 bool waitForReadOrWrite(
bool *readyToRead,
bool *readyToWrite,
159 bool checkRead,
bool checkWrite,
160 int msecs = 30000,
bool *timedOut = 0);
162 bool isReadNotificationEnabled()
const;
163 void setReadNotificationEnabled(
bool enable);
164 bool isWriteNotificationEnabled()
const;
165 void setWriteNotificationEnabled(
bool enable);
166 bool isExceptionNotificationEnabled()
const;
167 void setExceptionNotificationEnabled(
bool enable);
171 void connectionNotification();
232 UnknownSocketErrorString = -1
245 bool nativeListen(
int backlog);
247 #ifndef QT_NO_NETWORKINTERFACE 248 bool nativeJoinMulticastGroup(
const QHostAddress &groupAddress,
250 bool nativeLeaveMulticastGroup(
const QHostAddress &groupAddress,
255 qint64 nativeBytesAvailable()
const;
257 bool nativeHasPendingDatagrams()
const;
258 qint64 nativePendingDatagramSize()
const;
265 int nativeSelect(
int timeout,
bool selectForRead)
const;
266 int nativeSelect(
int timeout,
bool checkRead,
bool checkWrite,
267 bool *selectForRead,
bool *selectForWrite)
const;
272 bool fetchConnectionParameters();
277 #endif // QNATIVESOCKETENGINE_P_H
qt_sockaddr_storage storage
#define QT_END_NAMESPACE
This macro expands to.
SocketType
This enum describes the transport layer protocol.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
NetworkLayerProtocol
This enum describes the network layer protocol values used in Qt.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
The QNativeSocketEngine class provides low level access to a socket.
The QSocketNotifier class provides support for monitoring activity on a file descriptor.
Q_GUI_EXPORT QString errorString(EGLint code=eglGetError())
SocketState
This enum describes the different states in which a socket can be.
#define QT_BEGIN_NAMESPACE
This macro expands to.
SocketError
This enum describes the socket errors that can occur.
char __ss_pad1[QT_SS_PAD1SIZE]
static const char * data(const QByteArray &arr)
QSocketNotifier * writeNotifier
#define Q_DECLARE_PUBLIC(Class)
#define Q_AUTOTEST_EXPORT
#define Q_DECLARE_PRIVATE(Class)
The QNetworkInterface class provides a listing of the host's IP addresses and network interfaces...
char __ss_pad2[QT_SS_PAD2SIZE]
The QHostAddress class provides an IP address.