Qt 4.8
Public Functions | Static Public Functions | Public Variables | List of all members
QAbstractSocketPrivate Class Reference

#include <qabstractsocket_p.h>

Inheritance diagram for QAbstractSocketPrivate:
QIODevicePrivate QAbstractSocketEngineReceiver QObjectPrivate QObjectData QTcpSocketPrivate QUdpSocketPrivate QSslSocketPrivate QSslSocketBackendPrivate

Public Functions

void _q_abortConnectionAttempt ()
 This function is called after a certain number of seconds has passed while waiting for a connection. More...
 
void _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. More...
 
void _q_forceDisconnect ()
 
void _q_startConnecting (const QHostInfo &hostInfo)
 Slot connected to QHostInfo::lookupHost() in connectToHost(). More...
 
void _q_testConnection ()
 Tests if a connection has been established. More...
 
bool canReadNotification ()
 Slot connected to the read socket notifier. More...
 
bool canWriteNotification ()
 Slot connected to the write socket notifier. More...
 
void connectionNotification ()
 Slot connected to a notification of connection status change. More...
 
void exceptionNotification ()
 
void fetchConnectionParameters ()
 Sets up the internal state after the connection has succeeded. More...
 
bool flush ()
 Writes pending data in the write buffers to the socket. More...
 
bool initSocketLayer (QAbstractSocket::NetworkLayerProtocol protocol)
 Initializes the socket layer to by of type type, using the network layer protocol protocol. More...
 
void proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *authenticator)
 
 QAbstractSocketPrivate ()
 Constructs a QAbstractSocketPrivate. More...
 
bool readFromSocket ()
 Reads data from the socket layer into the read buffer. More...
 
void readNotification ()
 
void resetSocketLayer ()
 Resets the socket layer, clears the read and write buffers and deletes any socket notifiers. More...
 
void resolveProxy (const QString &hostName, quint16 port)
 Resolve the proxy to its final value. More...
 
void resolveProxy (quint16 port)
 
void setupSocketNotifiers ()
 
void startConnectingByName (const QString &host)
 Starts the connection to host, like _q_startConnecting below, but without hostname resolution. More...
 
void writeNotification ()
 
virtual ~QAbstractSocketPrivate ()
 Destructs the QAbstractSocket. More...
 
- Public Functions inherited from QIODevicePrivate
bool isSequential () const
 
virtual qint64 peek (char *data, qint64 maxSize)
 
virtual QByteArray peek (qint64 maxSize)
 
virtual bool putCharHelper (char c)
 
 QIODevicePrivate ()
 
virtual ~QIODevicePrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 
- Public Functions inherited from QAbstractSocketEngineReceiver
virtual ~QAbstractSocketEngineReceiver ()
 

Static Public Functions

static QAbstractSocketEnginegetSocketEngine (QAbstractSocket *)
 
static void pauseSocketNotifiers (QAbstractSocket *)
 
static void resumeSocketNotifiers (QAbstractSocket *)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Public Variables

bool abortCalled
 
QList< QHostAddressaddresses
 
int blockingTimeout
 
int cachedSocketDescriptor
 
bool closeCalled
 
int connectTimeElapsed
 
QTimerconnectTimer
 
QTimerdisconnectTimer
 
bool emittedBytesWritten
 
bool emittedReadyRead
 
QHostAddress host
 
int hostLookupId
 
QString hostName
 
bool isBuffered
 
QHostAddress localAddress
 
quint16 localPort
 
QHostAddress peerAddress
 
QString peerName
 
quint16 peerPort
 
bool pendingClose
 
quint16 port
 
bool prePauseExceptionSocketNotifierState
 
bool prePauseReadSocketNotifierState
 
bool prePauseWriteSocketNotifierState
 
QNetworkProxy proxy
 
QNetworkProxy proxyInUse
 
QRingBuffer readBuffer
 
qint64 readBufferMaxSize
 
bool readSocketNotifierCalled
 
bool readSocketNotifierState
 
bool readSocketNotifierStateSet
 
QAbstractSocketEnginesocketEngine
 
QAbstractSocket::SocketError socketError
 
QAbstractSocket::SocketType socketType
 
QAbstractSocket::SocketState state
 
QRingBuffer writeBuffer
 
- Public Variables inherited from QIODevicePrivate
AccessMode accessMode
 
bool baseReadLineDataCalled
 
QIODevicePrivateLinearBuffer buffer
 
qint64 devicePos
 
QString errorString
 
bool firstRead
 
QIODevice::OpenMode openMode
 
qint64pDevicePos
 
qint64 pos
 
qint64pPos
 
qint64 seqDumpPos
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QIODevicePrivate
enum  AccessMode { Unset, Sequential, RandomAccess }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 

Detailed Description

Definition at line 69 of file qabstractsocket_p.h.

Constructors and Destructors

◆ QAbstractSocketPrivate()

QAbstractSocketPrivate::QAbstractSocketPrivate ( )

Constructs a QAbstractSocketPrivate.

Warning
This function is not part of the public interface.

Initializes all members.

Definition at line 500 of file qabstractsocket.cpp.

501  : readSocketNotifierCalled(false),
504  emittedReadyRead(false),
505  emittedBytesWritten(false),
506  abortCalled(false),
507  closeCalled(false),
508  pendingClose(false),
509  port(0),
510  localPort(0),
511  peerPort(0),
512  socketEngine(0),
517  isBuffered(false),
518  blockingTimeout(30000),
519  connectTimer(0),
520  disconnectTimer(0),
522  hostLookupId(-1),
526 {
527 }
#define QABSTRACTSOCKET_BUFFERSIZE
QAbstractSocket::SocketState state
QAbstractSocket::SocketError socketError
QAbstractSocketEngine * socketEngine
QAbstractSocket::SocketType socketType

◆ ~QAbstractSocketPrivate()

QAbstractSocketPrivate::~QAbstractSocketPrivate ( )
virtual

Destructs the QAbstractSocket.

Warning
This function is not part of the public interface.

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

Definition at line 537 of file qabstractsocket.cpp.

538 {
539 }

Functions

◆ _q_abortConnectionAttempt()

void QAbstractSocketPrivate::_q_abortConnectionAttempt ( )

This function is called after a certain number of seconds has passed while waiting for a connection.

Warning
This function is not part of the public interface.

It simply tests the connection, and continues to the next address if the connection failed.

Definition at line 1171 of file qabstractsocket.cpp.

Referenced by _q_connectToNextAddress(), and proxyAuthenticationRequired().

1172 {
1174 #if defined(QABSTRACTSOCKET_DEBUG)
1175  qDebug("QAbstractSocketPrivate::_q_abortConnectionAttempt() (timed out)");
1176 #endif
1177  if (socketEngine)
1179 
1180  connectTimer->stop();
1181 
1182  if (addresses.isEmpty()) {
1185  q->setErrorString(QAbstractSocket::tr("Connection timed out"));
1186  emit q->stateChanged(state);
1187  emit q->error(socketError);
1188  } else {
1190  }
1191 }
QList< QHostAddress > addresses
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
QAbstractSocket::SocketState state
virtual void setWriteNotificationEnabled(bool enable)=0
#define emit
Definition: qobjectdefs.h:76
QAbstractSocket::SocketError socketError
void _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.
QAbstractSocketEngine * socketEngine
void stop()
Stops the timer.
Definition: qtimer.cpp:284
The QAbstractSocket class provides the base functionality common to all socket types.

◆ _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.

Warning
This function is not part of the public interface.

If the connection succeeds, QAbstractSocket will emit connected(). Otherwise, error(ConnectionRefusedError) or error(SocketTimeoutError) is emitted.

Definition at line 1018 of file qabstractsocket.cpp.

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

1019 {
1021  do {
1022  // Check for more pending addresses
1023  if (addresses.isEmpty()) {
1024 #if defined(QABSTRACTSOCKET_DEBUG)
1025  qDebug("QAbstractSocketPrivate::_q_connectToNextAddress(), all addresses failed.");
1026 #endif
1028  if (socketEngine) {
1030 #ifdef Q_OS_AIX
1031  // On AIX, the second connect call will result in EINVAL and not
1032  // ECONNECTIONREFUSED; although the meaning is the same.
1034 #endif
1037  q->setErrorString(QAbstractSocket::tr("Connection refused"));
1038  } else {
1040  q->setErrorString(socketEngine->errorString());
1041  }
1042  } else {
1043 // socketError = QAbstractSocket::ConnectionRefusedError;
1044 // q->setErrorString(QAbstractSocket::tr("Connection refused"));
1045  }
1046  emit q->stateChanged(state);
1047  emit q->error(socketError);
1048  return;
1049  }
1050 
1051  // Pick the first host address candidate
1052  host = addresses.takeFirst();
1053 #if defined(QABSTRACTSOCKET_DEBUG)
1054  qDebug("QAbstractSocketPrivate::_q_connectToNextAddress(), connecting to %s:%i, %d left to try",
1056 #endif
1057 
1058 #if defined(QT_NO_IPV6)
1060  // If we have no IPv6 support, then we will not be able to
1061  // connect. So we just pretend we didn't see this address.
1062 #if defined(QABSTRACTSOCKET_DEBUG)
1063  qDebug("QAbstractSocketPrivate::_q_connectToNextAddress(), skipping IPv6 entry");
1064 #endif
1065  continue;
1066  }
1067 #endif
1068 
1069  if (!initSocketLayer(host.protocol())) {
1070  // hope that the next address is better
1071 #if defined(QABSTRACTSOCKET_DEBUG)
1072  qDebug("QAbstractSocketPrivate::_q_connectToNextAddress(), failed to initialize sock layer");
1073 #endif
1074  continue;
1075  }
1076 
1077  // Tries to connect to the address. If it succeeds immediately
1078  // (localhost address on BSD or any UDP connect), emit
1079  // connected() and return.
1081  //_q_testConnection();
1083  return;
1084  }
1085 
1086  // cache the socket descriptor even if we're not fully connected yet
1088 
1089  // Check that we're in delayed connection state. If not, try
1090  // the next address
1092 #if defined(QABSTRACTSOCKET_DEBUG)
1093  qDebug("QAbstractSocketPrivate::_q_connectToNextAddress(), connection failed (%s)",
1095 #endif
1096  continue;
1097  }
1098 
1099  // Start the connect timer.
1100  if (threadData->eventDispatcher) {
1101  if (!connectTimer) {
1102  connectTimer = new QTimer(q);
1103  QObject::connect(connectTimer, SIGNAL(timeout()),
1106  }
1108  }
1109 
1110  // Wait for a write notification that will eventually call
1111  // _q_testConnection().
1113  break;
1115 }
virtual int socketDescriptor() const =0
QList< QHostAddress > addresses
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QThreadData * threadData
Definition: qobject_p.h:195
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
#define SIGNAL(a)
Definition: qobjectdefs.h:227
QAbstractSocket::SocketState state
virtual void setWriteNotificationEnabled(bool enable)=0
T takeFirst()
Removes the first item in the list and returns it.
Definition: qlist.h:489
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
#define emit
Definition: qobjectdefs.h:76
QAbstractSocket::SocketError socketError
QString toString() const
Returns the address as a string.
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
Definition: qstring.cpp:3993
void _q_abortConnectionAttempt()
This function is called after a certain number of seconds has passed while waiting for a connection...
#define QT_CONNECT_TIMEOUT
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
QAbstractSocket::NetworkLayerProtocol protocol() const
Returns the network layer protocol of the host address.
QAbstractSocket::SocketError error() const
QAbstractSocketEngine * socketEngine
void fetchConnectionParameters()
Sets up the internal state after the connection has succeeded.
bool initSocketLayer(QAbstractSocket::NetworkLayerProtocol protocol)
Initializes the socket layer to by of type type, using the network layer protocol protocol...
The QTimer class provides repetitive and single-shot timers.
Definition: qtimer.h:56
QAbstractSocket::SocketState state() const
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
Definition: qtimer.cpp:249
virtual bool connectToHost(const QHostAddress &address, quint16 port)=0
The QAbstractSocket class provides the base functionality common to all socket types.
QAbstractEventDispatcher * eventDispatcher
Definition: qthread_p.h:264

◆ _q_forceDisconnect()

void QAbstractSocketPrivate::_q_forceDisconnect ( )

Definition at line 1193 of file qabstractsocket.cpp.

Referenced by proxyAuthenticationRequired().

1194 {
1197  socketEngine->close();
1198  q->disconnectFromHost();
1199  }
1200 }
#define Q_Q(Class)
Definition: qglobal.h:2483
QAbstractSocket::SocketState state
QAbstractSocketEngine * socketEngine
virtual void close()=0
virtual bool isValid() const =0
The QAbstractSocket class provides the base functionality common to all socket types.

◆ _q_startConnecting()

void QAbstractSocketPrivate::_q_startConnecting ( const QHostInfo hostInfo)

Slot connected to QHostInfo::lookupHost() in connectToHost().

Warning
This function is not part of the public interface.

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 951 of file qabstractsocket.cpp.

Referenced by proxyAuthenticationRequired().

952 {
955  return;
956 
957  if (hostLookupId != -1 && hostLookupId != hostInfo.lookupId()) {
958  qWarning("QAbstractSocketPrivate::_q_startConnecting() received hostInfo for wrong lookup ID %d expected %d", hostInfo.lookupId(), hostLookupId);
959  }
960 
961  addresses = hostInfo.addresses();
962 
963 #if defined(QABSTRACTSOCKET_DEBUG)
964  QString s = QLatin1String("{");
965  for (int i = 0; i < addresses.count(); ++i) {
966  if (i != 0) s += QLatin1String(", ");
967  s += addresses.at(i).toString();
968  }
969  s += QLatin1Char('}');
970  qDebug("QAbstractSocketPrivate::_q_startConnecting(hostInfo == %s)", s.toLatin1().constData());
971 #endif
972 
973  // Try all addresses twice.
974  addresses += addresses;
975 
976  // If there are no addresses in the host list, report this to the
977  // user.
978  if (addresses.isEmpty()) {
979 #if defined(QABSTRACTSOCKET_DEBUG)
980  qDebug("QAbstractSocketPrivate::_q_startConnecting(), host not found");
981 #endif
984  q->setErrorString(QAbstractSocket::tr("Host not found"));
985  emit q->stateChanged(state);
987  return;
988  }
989 
990  // Enter Connecting state (see also sn_write, which is called by
991  // the write socket notifier after connect())
993  emit q->stateChanged(state);
994 
995  // Report the successful host lookup
996  emit q->hostFound();
997 
998  // Reset the total time spent connecting.
999  connectTimeElapsed = 0;
1000 
1001  // The addresses returned by the lookup will be tested one after
1002  // another by _q_connectToNextAddress().
1004 }
int lookupId() const
Returns the ID of this lookup.
Definition: qhostinfo.cpp:433
const QChar at(int i) const
Returns the character at the given index position in the string.
Definition: qstring.h:698
QList< QHostAddress > addresses
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
QList< QHostAddress > addresses() const
Returns the list of IP addresses associated with hostName().
Definition: qhostinfo.cpp:372
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
QAbstractSocket::SocketState state
#define emit
Definition: qobjectdefs.h:76
Q_CORE_EXPORT void qWarning(const char *,...)
QAbstractSocket::SocketError socketError
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
Definition: qstring.cpp:3993
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
void _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.
The QAbstractSocket class provides the base functionality common to all socket types.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

◆ _q_testConnection()

void QAbstractSocketPrivate::_q_testConnection ( )

Tests if a connection has been established.

Warning
This function is not part of the public interface.

If it has, connected() is emitted. Otherwise, _q_connectToNextAddress() is invoked.

Definition at line 1125 of file qabstractsocket.cpp.

Referenced by connectionNotification(), and proxyAuthenticationRequired().

1126 {
1127  if (socketEngine) {
1128  if (threadData->eventDispatcher) {
1129  if (connectTimer)
1130  connectTimer->stop();
1131  }
1132 
1134  // Fetch the parameters if our connection is completed;
1135  // otherwise, fall out and try the next address.
1137  if (pendingClose) {
1138  q_func()->disconnectFromHost();
1139  pendingClose = false;
1140  }
1141  return;
1142  }
1143 
1144  // don't retry the other addresses if we had a proxy error
1146  addresses.clear();
1147  }
1148 
1149  if (threadData->eventDispatcher) {
1150  if (connectTimer)
1151  connectTimer->stop();
1152  }
1153 
1154 #if defined(QABSTRACTSOCKET_DEBUG)
1155  qDebug("QAbstractSocketPrivate::_q_testConnection() connection failed,"
1156  " checking for alternative addresses");
1157 #endif
1159 }
QList< QHostAddress > addresses
QThreadData * threadData
Definition: qobject_p.h:195
Q_CORE_EXPORT void qDebug(const char *,...)
static bool isProxyError(QAbstractSocket::SocketError error)
void clear()
Removes all items from the list.
Definition: qlist.h:764
QAbstractSocket::SocketError error() const
void _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.
QAbstractSocketEngine * socketEngine
void fetchConnectionParameters()
Sets up the internal state after the connection has succeeded.
QAbstractSocket::SocketState state() const
void stop()
Stops the timer.
Definition: qtimer.cpp:284
QAbstractEventDispatcher * eventDispatcher
Definition: qthread_p.h:264

◆ canReadNotification()

bool QAbstractSocketPrivate::canReadNotification ( )

Slot connected to the read socket notifier.

Warning
This function is not part of the public interface.

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

Definition at line 641 of file qabstractsocket.cpp.

Referenced by proxyAuthenticationRequired(), and readNotification().

642 {
644 #if defined (QABSTRACTSOCKET_DEBUG)
645  qDebug("QAbstractSocketPrivate::canReadNotification()");
646 #endif
647 
648  // Prevent recursive calls
654  }
655  }
658 
659  if (!isBuffered)
661 
662  // If buffered, read data from the socket into the read buffer
663  qint64 newBytes = 0;
664  if (isBuffered) {
665  // Return if there is no space in the buffer
667 #if defined (QABSTRACTSOCKET_DEBUG)
668  qDebug("QAbstractSocketPrivate::canReadNotification() buffer is full");
669 #endif
670  return false;
671  }
672 
673  // If reading from the socket fails after getting a read
674  // notification, close the socket.
675  newBytes = readBuffer.size();
676  if (!readFromSocket()) {
677 #if defined (QABSTRACTSOCKET_DEBUG)
678  qDebug("QAbstractSocketPrivate::canReadNotification() disconnecting socket");
679 #endif
680  q->disconnectFromHost();
681  return false;
682  }
683  newBytes = readBuffer.size() - newBytes;
684 
685  // If read buffer is full, disable the read socket notifier.
688  }
689  }
690 
691  // only emit readyRead() when not recursing, and only if there is data available
692  bool hasData = newBytes > 0
693 #ifndef QT_NO_UDPSOCKET
695 #endif
697  ;
698 
699  if (!emittedReadyRead && hasData) {
701  emittedReadyRead = true;
702  emit q->readyRead();
703  }
704 
705  // If we were closed as a result of the readyRead() signal,
706  // return.
708 #if defined (QABSTRACTSOCKET_DEBUG)
709  qDebug("QAbstractSocketPrivate::canReadNotification() socket is closing - returning");
710 #endif
711  return true;
712  }
713 
714  if (!hasData && socketEngine)
716 
717  // reset the read socket notifier state if we reentered inside the
718  // readyRead() connected slot.
723  }
724  return true;
725 }
virtual bool isReadNotificationEnabled() const =0
bool readFromSocket()
Reads data from the socket layer into the read buffer.
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
QAbstractSocket::SocketState state
#define emit
Definition: qobjectdefs.h:76
__int64 qint64
Definition: qglobal.h:942
virtual bool hasPendingDatagrams() const =0
The QScopedValueRollback class resets a variable to its previous value on destruction.
QAbstractSocketEngine * socketEngine
QAbstractSocket::SocketType socketType
virtual void setReadNotificationEnabled(bool enable)=0
The QAbstractSocket class provides the base functionality common to all socket types.
int size() const

◆ canWriteNotification()

bool QAbstractSocketPrivate::canWriteNotification ( )

Slot connected to the write socket notifier.

Warning
This function is not part of the public interface.

It's called during a delayed connect or when the socket is ready for writing.

Definition at line 735 of file qabstractsocket.cpp.

Referenced by proxyAuthenticationRequired(), and writeNotification().

736 {
737 #if defined (Q_OS_WIN)
740 #endif
741 
742 #if defined (QABSTRACTSOCKET_DEBUG)
743  qDebug("QAbstractSocketPrivate::canWriteNotification() flushing");
744 #endif
745  int tmp = writeBuffer.size();
746  flush();
747 
748  if (socketEngine) {
749 #if defined (Q_OS_WIN)
750  if (!writeBuffer.isEmpty())
752 #else
753  if (writeBuffer.isEmpty() && socketEngine->bytesToWrite() == 0)
755 #endif
756  }
757 
758  return (writeBuffer.size() < tmp);
759 }
virtual qint64 bytesToWrite() const =0
bool isEmpty() const
Q_CORE_EXPORT void qDebug(const char *,...)
virtual bool isWriteNotificationEnabled() const =0
virtual void setWriteNotificationEnabled(bool enable)=0
QAbstractSocketEngine * socketEngine
bool flush()
Writes pending data in the write buffers to the socket.
int size() const

◆ connectionNotification()

void QAbstractSocketPrivate::connectionNotification ( )
virtual

Slot connected to a notification of connection status change.

Warning
This function is not part of the public interface.

Either we finished connecting or we failed to connect.

Implements QAbstractSocketEngineReceiver.

Definition at line 769 of file qabstractsocket.cpp.

Referenced by exceptionNotification().

770 {
771  // If in connecting state, check if the connection has been
772  // established, otherwise flush pending data.
774 #if defined (QABSTRACTSOCKET_DEBUG)
775  qDebug("QAbstractSocketPrivate::connectionNotification() testing connection");
776 #endif
778  }
779 }
Q_CORE_EXPORT void qDebug(const char *,...)
QAbstractSocket::SocketState state
void _q_testConnection()
Tests if a connection has been established.

◆ exceptionNotification()

void QAbstractSocketPrivate::exceptionNotification ( )
inlinevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 79 of file qabstractsocket_p.h.

79 {}

◆ fetchConnectionParameters()

void QAbstractSocketPrivate::fetchConnectionParameters ( )

Sets up the internal state after the connection has succeeded.

Warning
This function is not part of the public interface.

Definition at line 1269 of file qabstractsocket.cpp.

Referenced by _q_connectToNextAddress(), _q_testConnection(), and resolveProxy().

1270 {
1272 
1273  peerName = hostName;
1274  if (socketEngine) {
1282  }
1283 
1285  emit q->stateChanged(state);
1286  emit q->connected();
1287 
1288 #if defined(QABSTRACTSOCKET_DEBUG)
1289  qDebug("QAbstractSocketPrivate::fetchConnectionParameters() connection to %s:%i established",
1291 #endif
1292 }
virtual int socketDescriptor() const =0
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
QAbstractSocket::SocketState state
QHostAddress peerAddress() const
virtual void setWriteNotificationEnabled(bool enable)=0
#define emit
Definition: qobjectdefs.h:76
QHostAddress localAddress() const
QString toString() const
Returns the address as a string.
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
Definition: qstring.cpp:3993
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
QAbstractSocketEngine * socketEngine
virtual void setReadNotificationEnabled(bool enable)=0
The QAbstractSocket class provides the base functionality common to all socket types.

◆ flush()

bool QAbstractSocketPrivate::flush ( )

Writes pending data in the write buffers to the socket.

Warning
This function is not part of the public interface.

The function writes as much as it can without blocking.

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

Emits bytesWritten().

Definition at line 794 of file qabstractsocket.cpp.

Referenced by canWriteNotification(), and resolveProxy().

795 {
798  && socketEngine->bytesToWrite() == 0)) {
799 #if defined (QABSTRACTSOCKET_DEBUG)
800  qDebug("QAbstractSocketPrivate::flush() nothing to do: valid ? %s, writeBuffer.isEmpty() ? %s",
801  socketEngine->isValid() ? "yes" : "no", writeBuffer.isEmpty() ? "yes" : "no");
802 #endif
803 
804  // this covers the case when the buffer was empty, but we had to wait for the socket engine to finish
806  q->disconnectFromHost();
807 
808  return false;
809  }
810 
811  int nextSize = writeBuffer.nextDataBlockSize();
812  const char *ptr = writeBuffer.readPointer();
813 
814  // Attempt to write it all in one chunk.
815  qint64 written = socketEngine->write(ptr, nextSize);
816  if (written < 0) {
818  q->setErrorString(socketEngine->errorString());
819 #if defined (QABSTRACTSOCKET_DEBUG)
820  qDebug() << "QAbstractSocketPrivate::flush() write error, aborting." << socketEngine->errorString();
821 #endif
822  emit q->error(socketError);
823  // an unexpected error so close the socket.
824  q->abort();
825  return false;
826  }
827 
828 #if defined (QABSTRACTSOCKET_DEBUG)
829  qDebug("QAbstractSocketPrivate::flush() %lld bytes written to the network",
830  written);
831 #endif
832 
833  // Remove what we wrote so far.
834  writeBuffer.free(written);
835  if (written > 0) {
836  // Don't emit bytesWritten() recursively.
837  if (!emittedBytesWritten) {
839  emittedBytesWritten = true;
840  emit q->bytesWritten(written);
841  }
842  }
843 
845  && !socketEngine->bytesToWrite())
848  q->disconnectFromHost();
849 
850  return true;
851 }
virtual qint64 bytesToWrite() const =0
const char * readPointer() const
Definition: qringbuffer_p.h:73
int nextDataBlockSize() const
Definition: qringbuffer_p.h:69
bool isEmpty() const
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
QAbstractSocket::SocketState state
virtual bool isWriteNotificationEnabled() const =0
virtual void setWriteNotificationEnabled(bool enable)=0
#define emit
Definition: qobjectdefs.h:76
QAbstractSocket::SocketError socketError
const T * ptr(const T &t)
__int64 qint64
Definition: qglobal.h:942
virtual qint64 write(const char *data, qint64 len)=0
The QScopedValueRollback class resets a variable to its previous value on destruction.
void free(int bytes)
QAbstractSocket::SocketError error() const
QAbstractSocketEngine * socketEngine
virtual bool isValid() const =0
The QAbstractSocket class provides the base functionality common to all socket types.

◆ getSocketEngine()

QAbstractSocketEngine * QAbstractSocketPrivate::getSocketEngine ( QAbstractSocket socket)
static

Definition at line 1318 of file qabstractsocket.cpp.

1319 {
1320  return socket->d_func()->socketEngine;
1321 }

◆ initSocketLayer()

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

Initializes the socket layer to by of type type, using the network layer protocol protocol.

Warning
This function is not part of the public interface.

Resets the socket layer first if it's already initialized. Sets up the socket notifiers.

Definition at line 577 of file qabstractsocket.cpp.

Referenced by _q_connectToNextAddress(), QUdpSocketPrivate::doEnsureInitialized(), resolveProxy(), and startConnectingByName().

578 {
579 #ifdef QT_NO_NETWORKPROXY
580  // this is here to avoid a duplication of the call to createSocketEngine below
581  static const QNetworkProxy &proxyInUse = *(QNetworkProxy *)0;
582 #endif
583 
585 #if defined (QABSTRACTSOCKET_DEBUG)
586  QString typeStr;
587  if (q->socketType() == QAbstractSocket::TcpSocket) typeStr = QLatin1String("TcpSocket");
588  else if (q->socketType() == QAbstractSocket::UdpSocket) typeStr = QLatin1String("UdpSocket");
589  else typeStr = QLatin1String("UnknownSocketType");
590  QString protocolStr;
591  if (protocol == QAbstractSocket::IPv4Protocol) protocolStr = QLatin1String("IPv4Protocol");
592  else if (protocol == QAbstractSocket::IPv6Protocol) protocolStr = QLatin1String("IPv6Protocol");
593  else protocolStr = QLatin1String("UnknownNetworkLayerProtocol");
594 #endif
595 
598  if (!socketEngine) {
600  q->setErrorString(QAbstractSocket::tr("Operation on socket is not supported"));
601  return false;
602  }
603 #ifndef QT_NO_BEARERMANAGEMENT
604  //copy network session down to the socket engine (if it has been set)
605  socketEngine->setProperty("_q_networksession", q->property("_q_networksession"));
606 #endif
607 #ifndef QT_NO_NETWORKPROXY
608  //copy user agent to socket engine (if it has been set)
609  socketEngine->setProperty("_q_user-agent", q->property("_q_user-agent"));
610 #endif
611  if (!socketEngine->initialize(q->socketType(), protocol)) {
612 #if defined (QABSTRACTSOCKET_DEBUG)
613  qDebug("QAbstractSocketPrivate::initSocketLayer(%s, %s) failed (%s)",
614  typeStr.toLatin1().constData(), protocolStr.toLatin1().constData(),
616 #endif
618  q->setErrorString(socketEngine->errorString());
619  return false;
620  }
621 
623  socketEngine->setReceiver(this);
624 
625 #if defined (QABSTRACTSOCKET_DEBUG)
626  qDebug("QAbstractSocketPrivate::initSocketLayer(%s, %s) success",
627  typeStr.toLatin1().constData(), protocolStr.toLatin1().constData());
628 #endif
629  return true;
630 }
static QAbstractSocketEngine * createSocketEngine(QAbstractSocket::SocketType socketType, const QNetworkProxy &, QObject *parent)
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object&#39;s name property to value.
Definition: qobject.cpp:3755
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void resetSocketLayer()
Resets the socket layer, clears the read and write buffers and deletes any socket notifiers...
The QString class provides a Unicode character string.
Definition: qstring.h:83
virtual bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol=QAbstractSocket::IPv4Protocol)=0
QThreadData * threadData
Definition: qobject_p.h:195
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
The QNetworkProxy class provides a network layer proxy.
QAbstractSocket::SocketError socketError
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
Definition: qstring.cpp:3993
void setReceiver(QAbstractSocketEngineReceiver *receiver)
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
QAbstractSocket::SocketError error() const
QAbstractSocketEngine * socketEngine
The QAbstractSocket class provides the base functionality common to all socket types.
QAbstractEventDispatcher * eventDispatcher
Definition: qthread_p.h:264

◆ pauseSocketNotifiers()

void QAbstractSocketPrivate::pauseSocketNotifiers ( QAbstractSocket socket)
static

Definition at line 1295 of file qabstractsocket.cpp.

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

1296 {
1297  QAbstractSocketEngine *socketEngine = socket->d_func()->socketEngine;
1298  if (!socketEngine)
1299  return;
1300  socket->d_func()->prePauseReadSocketNotifierState = socketEngine->isReadNotificationEnabled();
1301  socket->d_func()->prePauseWriteSocketNotifierState = socketEngine->isWriteNotificationEnabled();
1302  socket->d_func()->prePauseExceptionSocketNotifierState = socketEngine->isExceptionNotificationEnabled();
1303  socketEngine->setReadNotificationEnabled(false);
1304  socketEngine->setWriteNotificationEnabled(false);
1305  socketEngine->setExceptionNotificationEnabled(false);
1306 }
virtual bool isReadNotificationEnabled() const =0
virtual void setExceptionNotificationEnabled(bool enable)=0
virtual bool isWriteNotificationEnabled() const =0
virtual void setWriteNotificationEnabled(bool enable)=0
virtual bool isExceptionNotificationEnabled() const =0
QAbstractSocketEngine * socketEngine
virtual void setReadNotificationEnabled(bool enable)=0

◆ proxyAuthenticationRequired()

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

Implements QAbstractSocketEngineReceiver.

Definition at line 82 of file qabstractsocket_p.h.

Referenced by QSslSocketPrivate::createPlainSocket().

82  {
84  q->proxyAuthenticationRequired(proxy, authenticator);
85  }
#define Q_Q(Class)
Definition: qglobal.h:2483
The QAbstractSocket class provides the base functionality common to all socket types.

◆ readFromSocket()

bool QAbstractSocketPrivate::readFromSocket ( )

Reads data from the socket layer into the read buffer.

Warning
This function is not part of the public interface.

Returns true on success; otherwise false.

Definition at line 1210 of file qabstractsocket.cpp.

Referenced by canReadNotification(), and resolveProxy().

1211 {
1213  // Find how many bytes we can read from the socket layer.
1214  qint64 bytesToRead = socketEngine->bytesAvailable();
1215  if (bytesToRead == 0) {
1216  // Under heavy load, certain conditions can trigger read notifications
1217  // for socket notifiers on which there is no activity. If we continue
1218  // to read 0 bytes from the socket, we will trigger behavior similar
1219  // to that which signals a remote close. When we hit this condition,
1220  // we try to read 4k of data from the socket, which will give us either
1221  // an EAGAIN/EWOULDBLOCK if the connection is alive (i.e., the remote
1222  // host has _not_ disappeared).
1223  bytesToRead = 4096;
1224  }
1225  if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - readBuffer.size()))
1226  bytesToRead = readBufferMaxSize - readBuffer.size();
1227 
1228 #if defined(QABSTRACTSOCKET_DEBUG)
1229  qDebug("QAbstractSocketPrivate::readFromSocket() about to read %d bytes",
1230  int(bytesToRead));
1231 #endif
1232 
1233  // Read from the socket, store data in the read buffer.
1234  char *ptr = readBuffer.reserve(bytesToRead);
1235  qint64 readBytes = socketEngine->read(ptr, bytesToRead);
1236  if (readBytes == -2) {
1237  // No bytes currently available for reading.
1238  readBuffer.chop(bytesToRead);
1239  return true;
1240  }
1241  readBuffer.chop(int(bytesToRead - (readBytes < 0 ? qint64(0) : readBytes)));
1242 #if defined(QABSTRACTSOCKET_DEBUG)
1243  qDebug("QAbstractSocketPrivate::readFromSocket() got %d bytes, buffer size = %d",
1244  int(readBytes), readBuffer.size());
1245 #endif
1246 
1247  if (!socketEngine->isValid()) {
1249  q->setErrorString(socketEngine->errorString());
1250  emit q->error(socketError);
1251 #if defined(QABSTRACTSOCKET_DEBUG)
1252  qDebug("QAbstractSocketPrivate::readFromSocket() read failed: %s",
1253  q->errorString().toLatin1().constData());
1254 #endif
1255  resetSocketLayer();
1256  return false;
1257  }
1258 
1259  return true;
1260 }
void resetSocketLayer()
Resets the socket layer, clears the read and write buffers and deletes any socket notifiers...
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
char * reserve(int bytes)
#define emit
Definition: qobjectdefs.h:76
QAbstractSocket::SocketError socketError
const T * ptr(const T &t)
__int64 qint64
Definition: qglobal.h:942
void chop(int bytes)
QAbstractSocket::SocketError error() const
QAbstractSocketEngine * socketEngine
virtual qint64 read(char *data, qint64 maxlen)=0
virtual bool isValid() const =0
The QAbstractSocket class provides the base functionality common to all socket types.
virtual qint64 bytesAvailable() const =0
int size() const

◆ readNotification()

void QAbstractSocketPrivate::readNotification ( )
inlinevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 77 of file qabstractsocket_p.h.

bool canReadNotification()
Slot connected to the read socket notifier.

◆ resetSocketLayer()

void QAbstractSocketPrivate::resetSocketLayer ( )

Resets the socket layer, clears the read and write buffers and deletes any socket notifiers.

Warning
This function is not part of the public interface.

Definition at line 549 of file qabstractsocket.cpp.

Referenced by initSocketLayer(), readFromSocket(), and resolveProxy().

550 {
551 #if defined (QABSTRACTSOCKET_DEBUG)
552  qDebug("QAbstractSocketPrivate::resetSocketLayer()");
553 #endif
554 
555  if (socketEngine) {
556  socketEngine->close();
558  delete socketEngine;
559  socketEngine = 0;
561  }
562  if (connectTimer)
563  connectTimer->stop();
564  if (disconnectTimer)
566 }
Q_CORE_EXPORT void qDebug(const char *,...)
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895
QAbstractSocketEngine * socketEngine
virtual void close()=0
void stop()
Stops the timer.
Definition: qtimer.cpp:284

◆ resolveProxy() [1/2]

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

Resolve the proxy to its final value.

Warning
This function is not part of the public interface.

Definition at line 861 of file qabstractsocket.cpp.

Referenced by QUdpSocketPrivate::doEnsureInitialized().

862 {
863  QList<QNetworkProxy> proxies;
864 
866  // a non-default proxy was set with setProxy
867  proxies << proxy;
868  } else {
869  // try the application settings instead
870  QNetworkProxyQuery query(hostname, port, QString(),
874  proxies = QNetworkProxyFactory::proxyForQuery(query);
875  }
876 
877  // return the first that we can use
878  foreach (const QNetworkProxy &p, proxies) {
881  continue;
882 
885  continue;
886 
887  proxyInUse = p;
888  return;
889  }
890 
891  // no proxy found
892  // DefaultProxy here will raise an error
894 }
QNetworkProxy::ProxyType type() const
Returns the proxy type for this instance.
The QString class provides a Unicode character string.
Definition: qstring.h:83
static QList< QNetworkProxy > proxyForQuery(const QNetworkProxyQuery &query)
This function takes the query request, query, examines the details of the type of socket or request a...
The QNetworkProxy class provides a network layer proxy.
Capabilities capabilities() const
Returns the capabilities of this proxy server.
The QNetworkProxyQuery class is used to query the proxy settings for a socket.
Definition: qnetworkproxy.h:60
QAbstractSocket::SocketType socketType

◆ resolveProxy() [2/2]

void QAbstractSocketPrivate::resolveProxy ( quint16  port)
inline

Definition at line 130 of file qabstractsocket_p.h.

Referenced by resolveProxy().

130 { resolveProxy(QString(), port); }
The QString class provides a Unicode character string.
Definition: qstring.h:83
void resolveProxy(const QString &hostName, quint16 port)
Resolve the proxy to its final value.

◆ resumeSocketNotifiers()

void QAbstractSocketPrivate::resumeSocketNotifiers ( QAbstractSocket socket)
static

Definition at line 1308 of file qabstractsocket.cpp.

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

1309 {
1310  QAbstractSocketEngine *socketEngine = socket->d_func()->socketEngine;
1311  if (!socketEngine)
1312  return;
1313  socketEngine->setReadNotificationEnabled(socket->d_func()->prePauseReadSocketNotifierState);
1314  socketEngine->setWriteNotificationEnabled(socket->d_func()->prePauseWriteSocketNotifierState);
1315  socketEngine->setExceptionNotificationEnabled(socket->d_func()->prePauseExceptionSocketNotifierState);
1316 }
virtual void setExceptionNotificationEnabled(bool enable)=0
virtual void setWriteNotificationEnabled(bool enable)=0
QAbstractSocketEngine * socketEngine
virtual void setReadNotificationEnabled(bool enable)=0

◆ setupSocketNotifiers()

void QAbstractSocketPrivate::setupSocketNotifiers ( )

Referenced by resolveProxy().

◆ startConnectingByName()

void QAbstractSocketPrivate::startConnectingByName ( const QString host)

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

Warning
This function is not part of the public interface.

Definition at line 905 of file qabstractsocket.cpp.

Referenced by resolveProxy().

906 {
909  return;
910 
911 #if defined(QABSTRACTSOCKET_DEBUG)
912  qDebug("QAbstractSocketPrivate::startConnectingByName(host == %s)", qPrintable(host));
913 #endif
914 
915  // ### Let the socket engine drive this?
917  emit q->stateChanged(state);
918 
919  connectTimeElapsed = 0;
920 
922  if (socketEngine->connectToHostByName(host, port) ||
925 
926  return;
927  }
928 
929  // failed to connect
931  q->setErrorString(socketEngine->errorString());
932  }
933 
935  emit q->error(socketError);
936  emit q->stateChanged(state);
937 }
virtual int socketDescriptor() const =0
virtual bool connectToHostByName(const QString &name, quint16 port)=0
#define Q_Q(Class)
Definition: qglobal.h:2483
Q_CORE_EXPORT void qDebug(const char *,...)
QAbstractSocket::SocketState state
#define emit
Definition: qobjectdefs.h:76
QAbstractSocket::SocketError socketError
QAbstractSocket::SocketError error() const
QAbstractSocketEngine * socketEngine
bool initSocketLayer(QAbstractSocket::NetworkLayerProtocol protocol)
Initializes the socket layer to by of type type, using the network layer protocol protocol...
QAbstractSocket::SocketState state() const
#define qPrintable(string)
Definition: qglobal.h:1750
The QAbstractSocket class provides the base functionality common to all socket types.

◆ writeNotification()

void QAbstractSocketPrivate::writeNotification ( )
inlinevirtual

Implements QAbstractSocketEngineReceiver.

Definition at line 78 of file qabstractsocket_p.h.

bool canWriteNotification()
Slot connected to the write socket notifier.

Properties

◆ abortCalled

bool QAbstractSocketPrivate::abortCalled

Definition at line 105 of file qabstractsocket_p.h.

◆ addresses

QList<QHostAddress> QAbstractSocketPrivate::addresses

◆ blockingTimeout

int QAbstractSocketPrivate::blockingTimeout

Definition at line 146 of file qabstractsocket_p.h.

◆ cachedSocketDescriptor

int QAbstractSocketPrivate::cachedSocketDescriptor

◆ closeCalled

bool QAbstractSocketPrivate::closeCalled

Definition at line 106 of file qabstractsocket_p.h.

◆ connectTimeElapsed

int QAbstractSocketPrivate::connectTimeElapsed

Definition at line 150 of file qabstractsocket_p.h.

Referenced by _q_startConnecting(), and startConnectingByName().

◆ connectTimer

QTimer* QAbstractSocketPrivate::connectTimer

◆ disconnectTimer

QTimer* QAbstractSocketPrivate::disconnectTimer

Definition at line 149 of file qabstractsocket_p.h.

Referenced by resetSocketLayer().

◆ emittedBytesWritten

bool QAbstractSocketPrivate::emittedBytesWritten

Definition at line 103 of file qabstractsocket_p.h.

Referenced by flush(), and QSslSocketBackendPrivate::transmit().

◆ emittedReadyRead

bool QAbstractSocketPrivate::emittedReadyRead

Definition at line 102 of file qabstractsocket_p.h.

Referenced by canReadNotification().

◆ host

QHostAddress QAbstractSocketPrivate::host

Definition at line 111 of file qabstractsocket_p.h.

Referenced by _q_connectToNextAddress(), and fetchConnectionParameters().

◆ hostLookupId

int QAbstractSocketPrivate::hostLookupId

Definition at line 152 of file qabstractsocket_p.h.

Referenced by _q_startConnecting().

◆ hostName

QString QAbstractSocketPrivate::hostName

◆ isBuffered

bool QAbstractSocketPrivate::isBuffered

Definition at line 145 of file qabstractsocket_p.h.

Referenced by canReadNotification().

◆ localAddress

QHostAddress QAbstractSocketPrivate::localAddress

Definition at line 116 of file qabstractsocket_p.h.

Referenced by fetchConnectionParameters().

◆ localPort

quint16 QAbstractSocketPrivate::localPort

Definition at line 114 of file qabstractsocket_p.h.

Referenced by fetchConnectionParameters().

◆ peerAddress

QHostAddress QAbstractSocketPrivate::peerAddress

Definition at line 117 of file qabstractsocket_p.h.

Referenced by fetchConnectionParameters().

◆ peerName

QString QAbstractSocketPrivate::peerName

◆ peerPort

quint16 QAbstractSocketPrivate::peerPort

Definition at line 115 of file qabstractsocket_p.h.

Referenced by fetchConnectionParameters().

◆ pendingClose

bool QAbstractSocketPrivate::pendingClose

◆ port

quint16 QAbstractSocketPrivate::port

◆ prePauseExceptionSocketNotifierState

bool QAbstractSocketPrivate::prePauseExceptionSocketNotifierState

Definition at line 161 of file qabstractsocket_p.h.

◆ prePauseReadSocketNotifierState

bool QAbstractSocketPrivate::prePauseReadSocketNotifierState

Definition at line 159 of file qabstractsocket_p.h.

◆ prePauseWriteSocketNotifierState

bool QAbstractSocketPrivate::prePauseWriteSocketNotifierState

Definition at line 160 of file qabstractsocket_p.h.

◆ proxy

QNetworkProxy QAbstractSocketPrivate::proxy

Definition at line 124 of file qabstractsocket_p.h.

Referenced by resolveProxy().

◆ proxyInUse

QNetworkProxy QAbstractSocketPrivate::proxyInUse

Definition at line 125 of file qabstractsocket_p.h.

Referenced by initSocketLayer(), and resolveProxy().

◆ readBuffer

QRingBuffer QAbstractSocketPrivate::readBuffer

◆ readBufferMaxSize

qint64 QAbstractSocketPrivate::readBufferMaxSize

◆ readSocketNotifierCalled

bool QAbstractSocketPrivate::readSocketNotifierCalled

Definition at line 98 of file qabstractsocket_p.h.

Referenced by canReadNotification().

◆ readSocketNotifierState

bool QAbstractSocketPrivate::readSocketNotifierState

Definition at line 99 of file qabstractsocket_p.h.

Referenced by canReadNotification().

◆ readSocketNotifierStateSet

bool QAbstractSocketPrivate::readSocketNotifierStateSet

Definition at line 100 of file qabstractsocket_p.h.

Referenced by canReadNotification().

◆ socketEngine

QAbstractSocketEngine* QAbstractSocketPrivate::socketEngine

◆ socketError

QAbstractSocket::SocketError QAbstractSocketPrivate::socketError

◆ socketType

QAbstractSocket::SocketType QAbstractSocketPrivate::socketType

Definition at line 154 of file qabstractsocket_p.h.

Referenced by canReadNotification(), and resolveProxy().

◆ state

QAbstractSocket::SocketState QAbstractSocketPrivate::state

◆ writeBuffer

QRingBuffer QAbstractSocketPrivate::writeBuffer

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