Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QNativeSocketEnginePrivate Class Reference

#include <qnativesocketengine_p_p.h>

Inheritance diagram for QNativeSocketEnginePrivate:
Collaboration diagram for QNativeSocketEnginePrivate:

Public Types

enum  ErrorString {
  NonBlockingInitFailedErrorString , BroadcastingInitFailedErrorString , NoIpV6ErrorString , RemoteHostClosedErrorString ,
  TimeOutErrorString , ResourceErrorString , OperationUnsupportedErrorString , ProtocolUnsupportedErrorString ,
  InvalidSocketErrorString , HostUnreachableErrorString , NetworkUnreachableErrorString , AccessErrorString ,
  ConnectionTimeOutErrorString , ConnectionRefusedErrorString , AddressInuseErrorString , AddressNotAvailableErrorString ,
  AddressProtectedErrorString , DatagramTooLargeErrorString , SendDatagramErrorString , ReceiveDatagramErrorString ,
  WriteErrorString , ReadErrorString , PortInuseErrorString , NotSocketErrorString ,
  InvalidProxyTypeString , TemporaryErrorString , NetworkDroppedConnectionErrorString , ConnectionResetErrorString ,
  UnknownSocketErrorString = -1
}
Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>

Public Member Functions

 QNativeSocketEnginePrivate ()
 ~QNativeSocketEnginePrivate ()
void setError (QAbstractSocket::SocketError error, ErrorString errorString) const
QHostAddress adjustAddressProtocol (const QHostAddress &address) const
int option (QNativeSocketEngine::SocketOption option) const
bool setOption (QNativeSocketEngine::SocketOption option, int value)
bool createNewSocket (QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol &protocol)
bool nativeConnect (const QHostAddress &address, quint16 port)
bool nativeBind (const QHostAddress &address, quint16 port)
bool nativeListen (int backlog)
qintptr nativeAccept ()
bool nativeJoinMulticastGroup (const QHostAddress &groupAddress, const QNetworkInterface &iface)
bool nativeLeaveMulticastGroup (const QHostAddress &groupAddress, const QNetworkInterface &iface)
QNetworkInterface nativeMulticastInterface () const
bool nativeSetMulticastInterface (const QNetworkInterface &iface)
qint64 nativeBytesAvailable () const
bool nativeHasPendingDatagrams () const
qint64 nativePendingDatagramSize () const
qint64 nativeReceiveDatagram (char *data, qint64 maxLength, QIpPacketHeader *header, QAbstractSocketEngine::PacketHeaderOptions options)
qint64 nativeSendDatagram (const char *data, qint64 length, const QIpPacketHeader &header)
qint64 nativeRead (char *data, qint64 maxLength)
qint64 nativeWrite (const char *data, qint64 length)
int nativeSelect (QDeadlineTimer deadline, bool selectForRead) const
int nativeSelect (QDeadlineTimer deadline, bool checkRead, bool checkWrite, bool *selectForRead, bool *selectForWrite) const
void nativeClose ()
bool checkProxy (const QHostAddress &address)
bool fetchConnectionParameters ()
 Fetches information about both ends of the connection: whatever is available.
void setPortAndAddress (quint16 port, const QHostAddress &address, qt_sockaddr *aa, QT_SOCKLEN_T *sockAddrSize)
Public Member Functions inherited from QAbstractSocketEnginePrivate
 QAbstractSocketEnginePrivate ()
Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
void setObjectNameWithoutBindings (const QString &name)
 QObjectPrivate (decltype(QObjectPrivateVersion) version=QObjectPrivateVersion)
virtual ~QObjectPrivate ()
void deleteChildren ()
void clearBindingStorage ()
void setParent_helper (QObject *)
void moveToThread_helper ()
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
QObjectList receiverList (const char *signal) 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
virtual void writeToDebugStream (QDebug &) const
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
Public Member Functions inherited from QObjectData
 QObjectData ()=default
virtual ~QObjectData ()=0
const QMetaObjectdynamicMetaObject () const

Public Attributes

qintptr socketDescriptor
QSocketNotifierreadNotifier
QSocketNotifierwriteNotifier
QSocketNotifierexceptNotifier
Public Attributes inherited from QAbstractSocketEnginePrivate
QAbstractSocket::SocketError socketError
bool hasSetSocketError
QString socketErrorString
QAbstractSocket::SocketState socketState
QAbstractSocket::SocketType socketType
QAbstractSocket::NetworkLayerProtocol socketProtocol
QHostAddress localAddress
quint16 localPort
QHostAddress peerAddress
quint16 peerPort
int inboundStreamCount
int outboundStreamCount
QAbstractSocketEngineReceiverreceiver
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 receiveParentEvents: 1
uint unused: 20
QAtomicInt postedEvents
QDynamicMetaObjectDatametaObject
QBindingStorage bindingStorage

Additional Inherited Members

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)

Detailed Description

Definition at line 72 of file qnativesocketengine_p_p.h.

Member Enumeration Documentation

◆ ErrorString

Enumerator
NonBlockingInitFailedErrorString 
BroadcastingInitFailedErrorString 
NoIpV6ErrorString 
RemoteHostClosedErrorString 
TimeOutErrorString 
ResourceErrorString 
OperationUnsupportedErrorString 
ProtocolUnsupportedErrorString 
InvalidSocketErrorString 
HostUnreachableErrorString 
NetworkUnreachableErrorString 
AccessErrorString 
ConnectionTimeOutErrorString 
ConnectionRefusedErrorString 
AddressInuseErrorString 
AddressNotAvailableErrorString 
AddressProtectedErrorString 
DatagramTooLargeErrorString 
SendDatagramErrorString 
ReceiveDatagramErrorString 
WriteErrorString 
ReadErrorString 
PortInuseErrorString 
NotSocketErrorString 
InvalidProxyTypeString 
TemporaryErrorString 
NetworkDroppedConnectionErrorString 
ConnectionResetErrorString 
UnknownSocketErrorString 

Definition at line 87 of file qnativesocketengine_p_p.h.

Constructor & Destructor Documentation

◆ QNativeSocketEnginePrivate()

QNativeSocketEnginePrivate::QNativeSocketEnginePrivate ( )

Constructs the private class and initializes all data members.

Definition at line 164 of file qnativesocketengine.cpp.

References exceptNotifier, readNotifier, and writeNotifier.

◆ ~QNativeSocketEnginePrivate()

QNativeSocketEnginePrivate::~QNativeSocketEnginePrivate ( )

Destructs the private class.

Definition at line 178 of file qnativesocketengine.cpp.

Member Function Documentation

◆ adjustAddressProtocol()

QHostAddress QNativeSocketEnginePrivate::adjustAddressProtocol ( const QHostAddress & address) const

Adjusts the incoming address family to match the currently bound address (if any). This function will convert v4-mapped IPv6 addresses to IPv4 and vice-versa. All other address types and values will be left unchanged.

Definition at line 304 of file qnativesocketengine.cpp.

◆ checkProxy()

bool QNativeSocketEnginePrivate::checkProxy ( const QHostAddress & address)

Definition at line 329 of file qnativesocketengine.cpp.

◆ createNewSocket()

bool QNativeSocketEnginePrivate::createNewSocket ( QAbstractSocket::SocketType socketType,
QAbstractSocket::NetworkLayerProtocol & socketProtocol )

Creates and returns a new socket descriptor of type socketType and socketProtocol. Returns -1 on failure.

Definition at line 185 of file qnativesocketengine_unix.cpp.

◆ fetchConnectionParameters()

bool QNativeSocketEnginePrivate::fetchConnectionParameters ( )

Fetches information about both ends of the connection: whatever is available.

Definition at line 1179 of file qnativesocketengine_unix.cpp.

◆ nativeAccept()

qintptr QNativeSocketEnginePrivate::nativeAccept ( )

Definition at line 597 of file qnativesocketengine_unix.cpp.

◆ nativeBind()

bool QNativeSocketEnginePrivate::nativeBind ( const QHostAddress & address,
quint16 port )

Definition at line 504 of file qnativesocketengine_unix.cpp.

◆ nativeBytesAvailable()

qint64 QNativeSocketEnginePrivate::nativeBytesAvailable ( ) const

Definition at line 809 of file qnativesocketengine_unix.cpp.

◆ nativeClose()

void QNativeSocketEnginePrivate::nativeClose ( )

Definition at line 1308 of file qnativesocketengine_unix.cpp.

◆ nativeConnect()

bool QNativeSocketEnginePrivate::nativeConnect ( const QHostAddress & address,
quint16 port )

Definition at line 422 of file qnativesocketengine_unix.cpp.

◆ nativeHasPendingDatagrams()

bool QNativeSocketEnginePrivate::nativeHasPendingDatagrams ( ) const

Definition at line 832 of file qnativesocketengine_unix.cpp.

◆ nativeJoinMulticastGroup()

bool QNativeSocketEnginePrivate::nativeJoinMulticastGroup ( const QHostAddress & groupAddress,
const QNetworkInterface & iface )

Definition at line 726 of file qnativesocketengine_unix.cpp.

◆ nativeLeaveMulticastGroup()

bool QNativeSocketEnginePrivate::nativeLeaveMulticastGroup ( const QHostAddress & groupAddress,
const QNetworkInterface & iface )

Definition at line 736 of file qnativesocketengine_unix.cpp.

◆ nativeListen()

bool QNativeSocketEnginePrivate::nativeListen ( int backlog)

Definition at line 567 of file qnativesocketengine_unix.cpp.

◆ nativeMulticastInterface()

QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface ( ) const

Definition at line 746 of file qnativesocketengine_unix.cpp.

◆ nativePendingDatagramSize()

qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize ( ) const

Definition at line 850 of file qnativesocketengine_unix.cpp.

◆ nativeRead()

qint64 QNativeSocketEnginePrivate::nativeRead ( char * data,
qint64 maxLength )

Definition at line 1355 of file qnativesocketengine_unix.cpp.

◆ nativeReceiveDatagram()

qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram ( char * data,
qint64 maxLength,
QIpPacketHeader * header,
QAbstractSocketEngine::PacketHeaderOptions options )

Definition at line 916 of file qnativesocketengine_unix.cpp.

◆ nativeSelect() [1/2]

int QNativeSocketEnginePrivate::nativeSelect ( QDeadlineTimer deadline,
bool checkRead,
bool checkWrite,
bool * selectForRead,
bool * selectForWrite ) const

Definition at line 1412 of file qnativesocketengine_unix.cpp.

◆ nativeSelect() [2/2]

int QNativeSocketEnginePrivate::nativeSelect ( QDeadlineTimer deadline,
bool selectForRead ) const

Definition at line 1404 of file qnativesocketengine_unix.cpp.

◆ nativeSendDatagram()

qint64 QNativeSocketEnginePrivate::nativeSendDatagram ( const char * data,
qint64 length,
const QIpPacketHeader & header )

Definition at line 1052 of file qnativesocketengine_unix.cpp.

◆ nativeSetMulticastInterface()

bool QNativeSocketEnginePrivate::nativeSetMulticastInterface ( const QNetworkInterface & iface)

Definition at line 780 of file qnativesocketengine_unix.cpp.

◆ nativeWrite()

qint64 QNativeSocketEnginePrivate::nativeWrite ( const char * data,
qint64 length )

Definition at line 1317 of file qnativesocketengine_unix.cpp.

◆ option()

int QNativeSocketEnginePrivate::option ( QNativeSocketEngine::SocketOption opt) const

Returns the value of the socket option opt.

Definition at line 271 of file qnativesocketengine_unix.cpp.

◆ setError()

void QNativeSocketEnginePrivate::setError ( QAbstractSocket::SocketError error,
ErrorString errorString ) const

Sets the error and error string if not set already. The only interesting error is the first one that occurred, and not the last one.

Definition at line 188 of file qnativesocketengine.cpp.

◆ setOption()

bool QNativeSocketEnginePrivate::setOption ( QNativeSocketEngine::SocketOption opt,
int v )

Sets the socket option opt to v.

Definition at line 327 of file qnativesocketengine_unix.cpp.

◆ setPortAndAddress()

void QNativeSocketEnginePrivate::setPortAndAddress ( quint16 port,
const QHostAddress & address,
qt_sockaddr * aa,
QT_SOCKLEN_T * sockAddrSize )
inline

Sets address and port in the aa sockaddr structure and the size in sockAddrSize. The address is converted to IPv6 if the current socket protocol is also IPv6.

Definition at line 163 of file qnativesocketengine_p_p.h.

Member Data Documentation

◆ exceptNotifier

QSocketNotifier * QNativeSocketEnginePrivate::exceptNotifier

Definition at line 81 of file qnativesocketengine_p_p.h.

Referenced by QNativeSocketEnginePrivate().

◆ readNotifier

QSocketNotifier* QNativeSocketEnginePrivate::readNotifier

Definition at line 81 of file qnativesocketengine_p_p.h.

Referenced by QNativeSocketEnginePrivate().

◆ socketDescriptor

qintptr QNativeSocketEnginePrivate::socketDescriptor

Definition at line 79 of file qnativesocketengine_p_p.h.

◆ writeNotifier

QSocketNotifier * QNativeSocketEnginePrivate::writeNotifier

Definition at line 81 of file qnativesocketengine_p_p.h.

Referenced by QNativeSocketEnginePrivate().


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