Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QAbstractSocketPrivate Class Reference

#include <qabstractsocket_p.h>

+ Inheritance diagram for QAbstractSocketPrivate:
+ Collaboration diagram for QAbstractSocketPrivate:

Public Member Functions

 QAbstractSocketPrivate ()
 
virtual ~QAbstractSocketPrivate ()
 
void readNotification () override
 
void writeNotification () override
 
void exceptionNotification () override
 
void closeNotification () override
 
void connectionNotification () override
 
void proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *authenticator) override
 
virtual bool bind (const QHostAddress &address, quint16 port, QAbstractSocket::BindMode mode)
 
virtual bool canReadNotification ()
 
bool canWriteNotification ()
 
void canCloseNotification ()
 
void _q_connectToNextAddress ()
 
void _q_startConnecting (const QHostInfo &hostInfo)
 
void _q_testConnection ()
 
void _q_abortConnectionAttempt ()
 
void resolveProxy (const QString &hostName, quint16 port)
 
void resolveProxy (quint16 port)
 
void resetSocketLayer ()
 
virtual bool flush ()
 
bool initSocketLayer (QAbstractSocket::NetworkLayerProtocol protocol)
 
virtual void configureCreatedSocket ()
 
void startConnectingByName (const QString &host)
 
void fetchConnectionParameters ()
 
bool readFromSocket ()
 
virtual bool writeToSocket ()
 
void emitReadyRead (int channel=0)
 
void emitBytesWritten (qint64 bytes, int channel=0)
 
void setError (QAbstractSocket::SocketError errorCode, const QString &errorString)
 
void setErrorAndEmit (QAbstractSocket::SocketError errorCode, const QString &errorString)
 
- Public Member Functions inherited from QIODevicePrivate
 QIODevicePrivate ()
 
virtual ~QIODevicePrivate ()
 
virtual bool putCharHelper (char c)
 
bool isSequential () const
 
bool isBufferEmpty () const
 
bool allWriteBuffersEmpty () const
 
void seekBuffer (qint64 newPos)
 
void setCurrentReadChannel (int channel)
 
void setCurrentWriteChannel (int channel)
 
void setReadChannelCount (int count)
 
void setWriteChannelCount (int count)
 
qint64 read (char *data, qint64 maxSize, bool peeking=false)
 
qint64 readLine (char *data, qint64 maxSize)
 
virtual qint64 peek (char *data, qint64 maxSize)
 
virtual QByteArray peek (qint64 maxSize)
 
qint64 skipByReading (qint64 maxSize)
 
void write (const char *data, qint64 size)
 
bool isWriteChunkCached (const char *data, qint64 size) const
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
void _q_reregisterTimers (void *pointer)
 
bool isSender (const QObject *receiver, const char *signal) const
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 
- Public Member Functions inherited from QAbstractSocketEngineReceiver
virtual ~QAbstractSocketEngineReceiver ()
 
virtual void readNotification ()=0
 
virtual void writeNotification ()=0
 
virtual void closeNotification ()=0
 
virtual void exceptionNotification ()=0
 
virtual void connectionNotification ()=0
 
virtual void proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *authenticator)=0
 

Static Public Member Functions

static void pauseSocketNotifiers (QAbstractSocket *)
 
static void resumeSocketNotifiers (QAbstractSocket *)
 
static QAbstractSocketEnginegetSocketEngine (QAbstractSocket *)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

bool emittedReadyRead = false
 
bool emittedBytesWritten = false
 
bool abortCalled = false
 
bool pendingClose = false
 
QAbstractSocket::PauseModes pauseMode = QAbstractSocket::PauseNever
 
QString hostName
 
quint16 port = 0
 
QHostAddress host
 
QList< QHostAddressaddresses
 
quint16 localPort = 0
 
quint16 peerPort = 0
 
QHostAddress localAddress
 
QHostAddress peerAddress
 
QString peerName
 
QAbstractSocketEnginesocketEngine = nullptr
 
qintptr cachedSocketDescriptor = -1
 
QNetworkProxy proxy
 
QNetworkProxy proxyInUse
 
QString protocolTag
 
qint64 readBufferMaxSize = 0
 
bool isBuffered = false
 
bool hasPendingData = false
 
QTimerconnectTimer = nullptr
 
int hostLookupId = -1
 
QAbstractSocket::SocketType socketType = QAbstractSocket::UnknownSocketType
 
QAbstractSocket::SocketState state = QAbstractSocket::UnconnectedState
 
QAbstractSocket::SocketError socketError = QAbstractSocket::UnknownSocketError
 
QAbstractSocket::NetworkLayerProtocol preferredNetworkLayerProtocol
 
bool prePauseReadSocketNotifierState = false
 
bool prePauseWriteSocketNotifierState = false
 
bool prePauseExceptionSocketNotifierState = false
 
- Public Attributes inherited from QIODevicePrivate
qint64 pos = 0
 
qint64 devicePos = 0
 
qint64 transactionPos = 0
 
QRingBufferRef buffer
 
QRingBufferRef writeBuffer
 
const QByteArraycurrentWriteChunk = nullptr
 
int readChannelCount = 0
 
int writeChannelCount = 0
 
int currentReadChannel = 0
 
int currentWriteChannel = 0
 
int readBufferChunkSize = QIODEVICE_BUFFERSIZE
 
int writeBufferChunkSize = 0
 
QVarLengthArray< QRingBuffer, 2 > readBuffers
 
QVarLengthArray< QRingBuffer, 1 > writeBuffers
 
QString errorString
 
QIODevice::OpenMode openMode = QIODevice::NotOpen
 
bool transactionStarted = false
 
bool baseReadLineDataCalled = false
 
AccessMode accessMode = Unset
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint unused: 21
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QIODevicePrivate
enum  AccessMode : quint8 { Unset , Sequential , RandomAccess }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData >
 

Detailed Description

Definition at line 31 of file qabstractsocket_p.h.

Constructor & Destructor Documentation

◆ QAbstractSocketPrivate()

QAbstractSocketPrivate::QAbstractSocketPrivate ( )

Constructs a QAbstractSocketPrivate. Initializes all members.

Definition at line 493 of file qabstractsocket.cpp.

References QABSTRACTSOCKET_BUFFERSIZE, and QIODevicePrivate::writeBufferChunkSize.

◆ ~QAbstractSocketPrivate()

QAbstractSocketPrivate::~QAbstractSocketPrivate ( )
virtual

Destructs the QAbstractSocket. If the socket layer is open, it will be reset.

Definition at line 503 of file qabstractsocket.cpp.

Member Function Documentation

◆ _q_abortConnectionAttempt()

void QAbstractSocketPrivate::_q_abortConnectionAttempt ( )

This function is called after a certain number of seconds has passed while waiting for a connection. It simply tests the connection, and continues to the next address if the connection failed.

Definition at line 1112 of file qabstractsocket.cpp.

References _q_connectToNextAddress(), addresses, connectTimer, emit, QList< T >::isEmpty(), qDebug, setError(), QAbstractSocketEngine::setWriteNotificationEnabled(), socketEngine, socketError, QAbstractSocket::SocketTimeoutError, state, QTimer::stop(), and QAbstractSocket::UnconnectedState.

Referenced by _q_connectToNextAddress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_connectToNextAddress()

void QAbstractSocketPrivate::_q_connectToNextAddress ( )

Called by a queued or direct connection from _q_startConnecting() or _q_testConnection(), this function takes the first address of the pending addresses list and tries to connect to it. If the connection succeeds, QAbstractSocket will emit connected(). Otherwise, errorOccurred(ConnectionRefusedError) or errorOccurred(SocketTimeoutError) is emitted.

Definition at line 985 of file qabstractsocket.cpp.

References _q_abortConnectionAttempt(), addresses, cachedSocketDescriptor, QObject::connect(), QAbstractSocket::ConnectedState, QAbstractSocket::ConnectingState, QAbstractSocket::ConnectionRefusedError, connectTimer, QAbstractSocketEngine::connectToHost(), QByteArray::constData(), QList< T >::count(), DefaultConnectTimeout, Qt::DirectConnection, emit, QAbstractSocketEngine::error(), QAbstractSocketEngine::errorString(), fetchConnectionParameters(), host, initSocketLayer(), QList< T >::isEmpty(), QBasicAtomicPointer< X >::loadRelaxed(), QHostAddress::protocol(), qDebug, setError(), QAbstractSocketEngine::setWriteNotificationEnabled(), SIGNAL, SLOT, socketEngine, socketError, QTimer::start(), state, QAbstractSocketEngine::state(), QList< T >::takeFirst(), QObjectPrivate::threadData, QString::toLatin1(), QHostAddress::toString(), QAbstractSocket::UnconnectedState, QAbstractSocket::UnknownSocketError, and QAbstractSocket::UnsupportedSocketOperationError.

Referenced by _q_abortConnectionAttempt(), _q_startConnecting(), and _q_testConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_startConnecting()

void QAbstractSocketPrivate::_q_startConnecting ( const QHostInfo hostInfo)

Slot connected to QHostInfo::lookupHost() in connectToHost(). This function starts the process of connecting to any number of candidate IP addresses for the host, if it was found. Calls _q_connectToNextAddress().

Definition at line 913 of file qabstractsocket.cpp.

References _q_connectToNextAddress(), QHostInfo::addresses(), addresses, QAbstractSocket::AnyIPProtocol, QList< T >::at(), QList< T >::clear(), QAbstractSocket::ConnectingState, QList< T >::count(), emit, hostLookupId, QAbstractSocket::HostLookupState, QAbstractSocket::HostNotFoundError, i, QList< T >::isEmpty(), QHostInfo::lookupId(), preferredNetworkLayerProtocol, qDebug, qWarning, setError(), state, QHostAddress::toString(), QAbstractSocket::UnconnectedState, and QAbstractSocket::UnknownNetworkLayerProtocol.

+ Here is the call graph for this function:

◆ _q_testConnection()

void QAbstractSocketPrivate::_q_testConnection ( )

Tests if a connection has been established. If it has, connected() is emitted. Otherwise, _q_connectToNextAddress() is invoked.

Definition at line 1076 of file qabstractsocket.cpp.

References _q_connectToNextAddress(), addresses, QList< T >::clear(), QAbstractSocket::ConnectedState, connectTimer, QAbstractSocketEngine::error(), fetchConnectionParameters(), isProxyError(), pendingClose, qDebug, socketEngine, QAbstractSocketEngine::state(), and QTimer::stop().

Referenced by connectionNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bind()

◆ canCloseNotification()

void QAbstractSocketPrivate::canCloseNotification ( )

Slot connected to the close socket notifier. It's called when the socket is closed.

Definition at line 662 of file qabstractsocket.cpp.

References emitReadyRead(), QMetaObject::invokeMethod(), isBuffered, qDebug, Qt::QueuedConnection, readBufferMaxSize, readFromSocket(), QAbstractSocket::SctpSocket, socketEngine, socketType, and QAbstractSocket::TcpSocket.

Referenced by closeNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ canReadNotification()

bool QAbstractSocketPrivate::canReadNotification ( )
virtual

Slot connected to the read socket notifier. This slot is called when new data is available for reading, or when the socket has been closed. Handles recursive calls.

Reimplemented in QSctpSocketPrivate.

Definition at line 602 of file qabstractsocket.cpp.

References QAbstractSocket::ClosingState, emitReadyRead(), hasPendingData, isBuffered, qDebug, readBufferMaxSize, readFromSocket(), QAbstractSocketEngine::setReadNotificationEnabled(), socketEngine, state, and QAbstractSocket::UnconnectedState.

Referenced by QSctpSocketPrivate::canReadNotification(), and readNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ canWriteNotification()

bool QAbstractSocketPrivate::canWriteNotification ( )

Slot connected to the write socket notifier. It's called during a delayed connect or when the socket is ready for writing.

Definition at line 706 of file qabstractsocket.cpp.

References qDebug, and writeToSocket().

Referenced by writeNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ closeNotification()

void QAbstractSocketPrivate::closeNotification ( )
inlineoverridevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 42 of file qabstractsocket_p.h.

References canCloseNotification().

+ Here is the call graph for this function:

◆ configureCreatedSocket()

void QAbstractSocketPrivate::configureCreatedSocket ( )
virtual

Reimplemented in QSctpSocketPrivate.

Definition at line 586 of file qabstractsocket.cpp.

References QAbstractSocketEngine::MaxStreamsSocketOption, QAbstractSocket::SctpSocket, QAbstractSocketEngine::setOption(), socketEngine, and QAbstractSocketEngine::socketType().

Referenced by initSocketLayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ connectionNotification()

void QAbstractSocketPrivate::connectionNotification ( )
overridevirtual

Slot connected to a notification of connection status change. Either we finished connecting or we failed to connect.

Implements QAbstractSocketEngineReceiver.

Definition at line 720 of file qabstractsocket.cpp.

References _q_testConnection(), QAbstractSocket::ConnectingState, qDebug, and state.

+ Here is the call graph for this function:

◆ emitBytesWritten()

void QAbstractSocketPrivate::emitBytesWritten ( qint64  bytes,
int  channel = 0 
)

Emits bytesWritten(), protecting against recursion.

Definition at line 1222 of file qabstractsocket.cpp.

References channel, QIODevicePrivate::currentWriteChannel, emit, and emittedBytesWritten.

Referenced by writeToSocket(), and QSctpSocketPrivate::writeToSocket().

+ Here is the caller graph for this function:

◆ emitReadyRead()

void QAbstractSocketPrivate::emitReadyRead ( int  channel = 0)

Emits readyRead(), protecting against recursion.

Definition at line 1205 of file qabstractsocket.cpp.

References channel, QIODevicePrivate::currentReadChannel, emit, and emittedReadyRead.

Referenced by canCloseNotification(), canReadNotification(), and QSctpSocketPrivate::canReadNotification().

+ Here is the caller graph for this function:

◆ exceptionNotification()

void QAbstractSocketPrivate::exceptionNotification ( )
inlineoverridevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 41 of file qabstractsocket_p.h.

◆ fetchConnectionParameters()

◆ flush()

bool QAbstractSocketPrivate::flush ( )
virtual

Writes pending data in the write buffers to the socket. The function writes as much as it can without blocking. If any data was written, this function returns true; otherwise false is returned.

Reimplemented in QSslSocketPrivate.

Definition at line 805 of file qabstractsocket.cpp.

References QIODevicePrivate::allWriteBuffersEmpty(), and writeToSocket().

+ Here is the call graph for this function:

◆ getSocketEngine()

QAbstractSocketEngine * QAbstractSocketPrivate::getSocketEngine ( QAbstractSocket socket)
static

Definition at line 1344 of file qabstractsocket.cpp.

References socket.

◆ initSocketLayer()

bool QAbstractSocketPrivate::initSocketLayer ( QAbstractSocket::NetworkLayerProtocol  protocol)

Initializes the socket layer to by of type type, using the network layer protocol protocol. Resets the socket layer first if it's already initialized. Sets up the socket notifiers.

Definition at line 535 of file qabstractsocket.cpp.

References configureCreatedSocket(), QByteArray::constData(), QLatin1StringView::constData(), QAbstractSocketEngine::createSocketEngine(), QAbstractSocketEngine::error(), QAbstractSocketEngine::errorString(), QAbstractSocketEngine::initialize(), QAbstractSocket::IPv4Protocol, QAbstractSocket::IPv6Protocol, QBasicAtomicPointer< X >::loadRelaxed(), proxyInUse, qDebug, resetSocketLayer(), QAbstractSocket::SctpSocket, setError(), QAbstractSocketEngine::setReceiver(), socketEngine, QAbstractSocket::TcpSocket, QObjectPrivate::threadData, QString::toLatin1(), typeStr(), QAbstractSocket::UdpSocket, and QAbstractSocket::UnsupportedSocketOperationError.

Referenced by _q_connectToNextAddress(), bind(), and startConnectingByName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pauseSocketNotifiers()

void QAbstractSocketPrivate::pauseSocketNotifiers ( QAbstractSocket socket)
static

Definition at line 1294 of file qabstractsocket.cpp.

References QAbstractSocketEngine::isExceptionNotificationEnabled(), QAbstractSocketEngine::isReadNotificationEnabled(), QAbstractSocketEngine::isWriteNotificationEnabled(), qDebug, QIODevicePrivate::read(), QAbstractSocketEngine::setExceptionNotificationEnabled(), QAbstractSocketEngine::setReadNotificationEnabled(), QAbstractSocketEngine::setWriteNotificationEnabled(), socket, QAbstractSocketEngine::socketDescriptor(), socketEngine, and QIODevicePrivate::write().

Referenced by QHttpNetworkConnectionPrivate::pauseConnection(), and QSslSocketPrivate::pauseSocketNotifiers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ proxyAuthenticationRequired()

void QAbstractSocketPrivate::proxyAuthenticationRequired ( const QNetworkProxy proxy,
QAuthenticator authenticator 
)
inlineoverridevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 45 of file qabstractsocket_p.h.

References emit, and proxy.

Referenced by QSslSocketPrivate::createPlainSocket().

+ Here is the caller graph for this function:

◆ readFromSocket()

bool QAbstractSocketPrivate::readFromSocket ( )

Reads data from the socket layer into the read buffer. Returns true on success; otherwise false.

Definition at line 1139 of file qabstractsocket.cpp.

References QAbstractSocketEngine::bytesAvailable(), QByteArray::constData(), QVarLengthArray< T, Prealloc >::data(), QAbstractSocketEngine::error(), QAbstractSocketEngine::errorString(), QAbstractSocketEngine::isValid(), ptr(), qDebug, QAbstractSocketEngine::read(), readBufferMaxSize, resetSocketLayer(), setErrorAndEmit(), socketEngine, and QString::toLatin1().

Referenced by canCloseNotification(), and canReadNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readNotification()

void QAbstractSocketPrivate::readNotification ( )
inlineoverridevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 39 of file qabstractsocket_p.h.

References canReadNotification().

+ Here is the call graph for this function:

◆ resetSocketLayer()

void QAbstractSocketPrivate::resetSocketLayer ( )

Resets the socket layer and deletes any socket notifiers.

Definition at line 511 of file qabstractsocket.cpp.

References cachedSocketDescriptor, QAbstractSocketEngine::close(), connectTimer, QObject::disconnect(), hasPendingData, qDebug, socketEngine, and QTimer::stop().

Referenced by initSocketLayer(), and readFromSocket().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveProxy() [1/2]

void QAbstractSocketPrivate::resolveProxy ( const QString hostname,
quint16  port 
)

Resolve the proxy to its final value.

Definition at line 820 of file qabstractsocket.cpp.

References QNetworkProxy::DefaultProxy, protocolTag, proxy, QNetworkProxyFactory::proxyForQuery(), proxyInUse, QNetworkProxyQuery::SctpSocket, QAbstractSocket::SctpSocket, QNetworkProxy::SctpTunnelingCapability, socketType, QNetworkProxyQuery::TcpSocket, QAbstractSocket::TcpSocket, QNetworkProxy::TunnelingCapability, QNetworkProxy::type(), QNetworkProxyQuery::UdpSocket, QAbstractSocket::UdpSocket, and QNetworkProxy::UdpTunnelingCapability.

Referenced by bind().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveProxy() [2/2]

void QAbstractSocketPrivate::resolveProxy ( quint16  port)
inline

Definition at line 93 of file qabstractsocket_p.h.

References resolveProxy().

Referenced by resolveProxy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resumeSocketNotifiers()

void QAbstractSocketPrivate::resumeSocketNotifiers ( QAbstractSocket socket)
static

Definition at line 1324 of file qabstractsocket.cpp.

References priv(), qDebug, QAbstractSocketEngine::setExceptionNotificationEnabled(), QAbstractSocketEngine::setReadNotificationEnabled(), QAbstractSocketEngine::setWriteNotificationEnabled(), socket, QAbstractSocketEngine::socketDescriptor(), and socketEngine.

Referenced by QAbstractSocket::resume(), QHttpNetworkConnectionPrivate::resumeConnection(), and QSslSocketPrivate::resumeSocketNotifiers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setError()

void QAbstractSocketPrivate::setError ( QAbstractSocket::SocketError  errorCode,
const QString errStr 
)

Sets the socket error state to errorCode and errorString.

Definition at line 1354 of file qabstractsocket.cpp.

References QIODevicePrivate::errorString, and socketError.

Referenced by _q_abortConnectionAttempt(), _q_connectToNextAddress(), _q_startConnecting(), initSocketLayer(), setErrorAndEmit(), and startConnectingByName().

+ Here is the caller graph for this function:

◆ setErrorAndEmit()

void QAbstractSocketPrivate::setErrorAndEmit ( QAbstractSocket::SocketError  errorCode,
const QString errorString 
)

Sets the socket error state to errorCode and errorString, and emits the QAbstractSocket::errorOccurred() signal.

Definition at line 1367 of file qabstractsocket.cpp.

References emit, QIODevicePrivate::errorString, and setError().

Referenced by QSslSocketPrivate::_q_errorSlot(), QSslSocketPrivate::_q_resumeImplementation(), bind(), QSctpSocketPrivate::canReadNotification(), readFromSocket(), QSslSocketPrivate::verifyProtocolSupported(), writeToSocket(), and QSctpSocketPrivate::writeToSocket().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startConnectingByName()

void QAbstractSocketPrivate::startConnectingByName ( const QString host)

Starts the connection to host, like _q_startConnecting below, but without hostname resolution.

Definition at line 869 of file qabstractsocket.cpp.

References cachedSocketDescriptor, QAbstractSocket::ConnectedState, QAbstractSocket::ConnectingState, QAbstractSocketEngine::connectToHostByName(), emit, QAbstractSocketEngine::error(), QAbstractSocketEngine::errorString(), fetchConnectionParameters(), host, initSocketLayer(), qDebug, qPrintable, setError(), socketEngine, socketError, state, QAbstractSocketEngine::state(), QAbstractSocket::UnconnectedState, and QAbstractSocket::UnknownNetworkLayerProtocol.

+ Here is the call graph for this function:

◆ writeNotification()

void QAbstractSocketPrivate::writeNotification ( )
inlineoverridevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 40 of file qabstractsocket_p.h.

References canWriteNotification().

+ Here is the call graph for this function:

◆ writeToSocket()

bool QAbstractSocketPrivate::writeToSocket ( )
virtual

Writes one pending data block in the write buffer to the socket.

It is usually invoked by canWriteNotification after one or more calls to write().

Emits bytesWritten().

Reimplemented in QSctpSocketPrivate.

Definition at line 741 of file qabstractsocket.cpp.

References QAbstractSocketEngine::bytesToWrite(), QAbstractSocket::ClosingState, emitBytesWritten(), QAbstractSocketEngine::error(), QAbstractSocketEngine::errorString(), QAbstractSocketEngine::isValid(), ptr(), Q_INT64_C, qDebug, setErrorAndEmit(), QAbstractSocketEngine::setWriteNotificationEnabled(), socketEngine, state, and QAbstractSocketEngine::write().

Referenced by canWriteNotification(), flush(), and QSctpSocketPrivate::writeToSocket().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ abortCalled

bool QAbstractSocketPrivate::abortCalled = false

Definition at line 66 of file qabstractsocket_p.h.

Referenced by QSslSocketPrivate::init().

◆ addresses

QList<QHostAddress> QAbstractSocketPrivate::addresses

◆ cachedSocketDescriptor

◆ connectTimer

QTimer* QAbstractSocketPrivate::connectTimer = nullptr

◆ emittedBytesWritten

bool QAbstractSocketPrivate::emittedBytesWritten = false

◆ emittedReadyRead

bool QAbstractSocketPrivate::emittedReadyRead = false

Definition at line 63 of file qabstractsocket_p.h.

Referenced by emitReadyRead().

◆ hasPendingData

bool QAbstractSocketPrivate::hasPendingData = false

Definition at line 112 of file qabstractsocket_p.h.

Referenced by canReadNotification(), and resetSocketLayer().

◆ host

QHostAddress QAbstractSocketPrivate::host

◆ hostLookupId

int QAbstractSocketPrivate::hostLookupId = -1

Definition at line 116 of file qabstractsocket_p.h.

Referenced by _q_startConnecting().

◆ hostName

QString QAbstractSocketPrivate::hostName

◆ isBuffered

bool QAbstractSocketPrivate::isBuffered = false

Definition at line 111 of file qabstractsocket_p.h.

Referenced by canCloseNotification(), and canReadNotification().

◆ localAddress

QHostAddress QAbstractSocketPrivate::localAddress

Definition at line 78 of file qabstractsocket_p.h.

Referenced by bind(), QSslSocketPrivate::bind(), and fetchConnectionParameters().

◆ localPort

quint16 QAbstractSocketPrivate::localPort = 0

Definition at line 76 of file qabstractsocket_p.h.

Referenced by bind(), QSslSocketPrivate::bind(), and fetchConnectionParameters().

◆ pauseMode

QAbstractSocket::PauseModes QAbstractSocketPrivate::pauseMode = QAbstractSocket::PauseNever

Definition at line 69 of file qabstractsocket_p.h.

◆ peerAddress

QHostAddress QAbstractSocketPrivate::peerAddress

Definition at line 79 of file qabstractsocket_p.h.

Referenced by fetchConnectionParameters().

◆ peerName

QString QAbstractSocketPrivate::peerName

◆ peerPort

quint16 QAbstractSocketPrivate::peerPort = 0

Definition at line 77 of file qabstractsocket_p.h.

Referenced by fetchConnectionParameters().

◆ pendingClose

◆ port

quint16 QAbstractSocketPrivate::port = 0

Definition at line 72 of file qabstractsocket_p.h.

◆ preferredNetworkLayerProtocol

QAbstractSocket::NetworkLayerProtocol QAbstractSocketPrivate::preferredNetworkLayerProtocol
Initial value:

Definition at line 124 of file qabstractsocket_p.h.

Referenced by _q_startConnecting().

◆ prePauseExceptionSocketNotifierState

bool QAbstractSocketPrivate::prePauseExceptionSocketNotifierState = false

Definition at line 129 of file qabstractsocket_p.h.

◆ prePauseReadSocketNotifierState

bool QAbstractSocketPrivate::prePauseReadSocketNotifierState = false

Definition at line 127 of file qabstractsocket_p.h.

◆ prePauseWriteSocketNotifierState

bool QAbstractSocketPrivate::prePauseWriteSocketNotifierState = false

Definition at line 128 of file qabstractsocket_p.h.

◆ protocolTag

QString QAbstractSocketPrivate::protocolTag

Definition at line 88 of file qabstractsocket_p.h.

Referenced by resolveProxy().

◆ proxy

QNetworkProxy QAbstractSocketPrivate::proxy

Definition at line 86 of file qabstractsocket_p.h.

Referenced by proxyAuthenticationRequired(), and resolveProxy().

◆ proxyInUse

QNetworkProxy QAbstractSocketPrivate::proxyInUse

Definition at line 87 of file qabstractsocket_p.h.

Referenced by initSocketLayer(), and resolveProxy().

◆ readBufferMaxSize

◆ socketEngine

◆ socketError

◆ socketType

Definition at line 118 of file qabstractsocket_p.h.

Referenced by bind(), canCloseNotification(), and resolveProxy().

◆ state


The documentation for this class was generated from the following files: