4#ifndef QABSTRACTSOCKET_H
5#define QABSTRACTSOCKET_H
7#include <QtNetwork/qtnetworkglobal.h>
8#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
9#include <QtNetwork/qabstractsocket.h>
12#include <QtNetwork/qhostaddress.h>
14#include <QtCore/qiodevice.h>
15#include <QtCore/qobject.h>
16#ifndef QT_NO_DEBUG_STREAM
17#include <QtCore/qdebug.h>
24#ifndef QT_NO_NETWORKPROXY
40 UnknownSocketType = -1
44#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
45 enum NetworkLayerProtocol {
49 UnknownNetworkLayerProtocol = -1
51 Q_ENUM(NetworkLayerProtocol)
86 UnknownSocketError = -1
111 DefaultForPlatform = 0x0,
113 DontShareAddress = 0x2,
114 ReuseAddressHint = 0x4
119 PauseOnSslErrors = 0x1
127 PauseModes pauseMode()
const;
128 void setPauseMode(PauseModes pauseMode);
131 BindMode
mode = DefaultForPlatform);
132#if QT_VERSION >= QT_VERSION_CHECK(7,0,0) || defined(Q_QDOC)
145 bool isValid()
const;
156 qint64 readBufferSize()
const;
161 virtual qintptr socketDescriptor()
const;
162 virtual bool setSocketDescriptor(
qintptr socketDescriptor, SocketState
state = ConnectedState,
163 OpenMode openMode = ReadWrite);
169 SocketState
state()
const;
170 SocketError
error()
const;
173 void close()
override;
178 virtual bool waitForConnected(
int msecs = 30000);
181 virtual bool waitForDisconnected(
int msecs = 30000);
183#ifndef QT_NO_NETWORKPROXY
196#ifndef QT_NO_NETWORKPROXY
230#ifndef QT_NO_DEBUG_STREAM
238 QAbstractSocket__SocketState, Q_NETWORK_EXPORT)
240 QAbstractSocket__SocketError, Q_NETWORK_EXPORT)
The QAbstractSocket class provides the base functionality common to all socket types.
SocketState
This enum describes the different states in which a socket can be.
void stateChanged(QAbstractSocket::SocketState)
This signal is emitted whenever QAbstractSocket's state changes.
bool bind(quint16 port=0, BindMode mode=DefaultForPlatform)
void errorOccurred(QAbstractSocket::SocketError)
void connected()
This signal is emitted after connectToHost() has been called and a connection has been successfully e...
@ ReceiveBufferSizeSocketOption
@ MulticastLoopbackOption
@ SendBufferSizeSocketOption
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator)
SocketError
This enum describes the socket errors that can occur.
@ SocketAddressNotAvailableError
@ ProxyConnectionClosedError
@ ProxyConnectionRefusedError
@ SslInvalidUserDataError
@ ProxyConnectionTimeoutError
@ SslHandshakeFailedError
@ UnsupportedSocketOperationError
@ UnfinishedSocketOperationError
@ ProxyAuthenticationRequiredError
SocketType
This enum describes the transport layer protocol.
void disconnected()
This signal is emitted when the socket has been disconnected.
void hostFound()
This signal is emitted after connectToHost() has been called and the host lookup has succeeded.
bool bind(QHostAddress::SpecialAddress addr, quint16 port=0, BindMode mode=DefaultForPlatform)
The QAuthenticator class provides an authentication object.
The QHostAddress class provides an IP address.
SpecialAddress
\value Null The null address object.
@ UnknownNetworkLayerProtocol
The QHostInfo class provides static functions for host name lookups.
\inmodule QtCore \reentrant
virtual bool isSequential() const
Returns true if this device is sequential; otherwise returns false.
virtual bool waitForBytesWritten(int msecs)
For buffered devices, this function waits until a payload of buffered written data has been written t...
virtual bool waitForReadyRead(int msecs)
Blocks until new data is available for reading and the readyRead() signal has been emitted,...
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
virtual qint64 skipData(qint64 maxSize)
virtual qint64 readLineData(char *data, qint64 maxlen)
Reads up to maxSize characters into data and returns the number of characters read.
virtual qint64 writeData(const char *data, qint64 len)=0
Writes up to maxSize bytes from data to the device.
virtual qint64 bytesToWrite() const
For buffered devices, this function returns the number of bytes waiting to be written.
virtual void close()
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen.
The QNetworkProxy class provides a network layer proxy.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
AudioChannelLayoutTag tag
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static QT_BEGIN_NAMESPACE const char * socketType(QSocketNotifier::Type type)
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QIODevice::OpenMode modes)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint64EXT address
sock connectToHost(url.host(), url.port(80))
serverSocket setProxy(QNetworkProxy::NoProxy)
[0]
socket disconnectFromHost()
[0]
socketLayer bind(QHostAddress::Any, 4000)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent