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
QSocks5SocketEnginePrivate Class Reference

#include <qsocks5socketengine_p.h>

Inheritance diagram for QSocks5SocketEnginePrivate:
Collaboration diagram for QSocks5SocketEnginePrivate:

Public Types

enum  Socks5State {
  Uninitialized = 0 , ConnectError , AuthenticationMethodsSent , Authenticating ,
  AuthenticatingError , RequestMethodSent , RequestError , Connected ,
  UdpAssociateSuccess , BindSuccess , ControlSocketError , SocksError ,
  HostNameLookupError
}
enum  Socks5Mode { NoMode , ConnectMode , BindMode , UdpAssociateMode }
enum  Socks5Error {
  SocksFailure = 0x01 , ConnectionNotAllowed = 0x02 , NetworkUnreachable = 0x03 , HostUnreachable = 0x04 ,
  ConnectionRefused = 0x05 , TTLExpired = 0x06 , CommandNotSupported = 0x07 , AddressTypeNotSupported = 0x08 ,
  LastKnownError = AddressTypeNotSupported , UnknownError
}
Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>

Public Member Functions

 QSocks5SocketEnginePrivate ()
 ~QSocks5SocketEnginePrivate ()
void initialize (Socks5Mode socks5Mode)
void setErrorState (Socks5State state, const QString &extraMessage=QString())
void setErrorState (Socks5State state, Socks5Error socks5error)
void reauthenticate ()
void parseAuthenticationMethodReply ()
void parseAuthenticatingReply ()
void sendRequestMethod ()
void parseRequestMethodReply ()
void parseNewConnection ()
bool waitForConnected (QDeadlineTimer deadline, bool *timedOut)
void _q_controlSocketConnected ()
void _q_controlSocketReadNotification ()
void _q_controlSocketErrorOccurred (QAbstractSocket::SocketError)
void _q_udpSocketReadNotification ()
void _q_controlSocketBytesWritten ()
void _q_controlSocketDisconnected ()
void _q_controlSocketStateChanged (QAbstractSocket::SocketState)
void _q_emitPendingReadNotification ()
void emitReadNotification ()
void _q_emitPendingWriteNotification ()
void emitWriteNotification ()
void _q_emitPendingConnectionNotification ()
void emitConnectionNotification ()
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

Socks5State socks5State
Socks5Mode mode
QNetworkProxy proxyInfo
bool readNotificationEnabled
bool writeNotificationEnabled
bool exceptNotificationEnabled
qintptr socketDescriptor
QSocks5Datadata
QSocks5ConnectDataconnectData
QSocks5UdpAssociateDataudpData
QSocks5BindDatabindData
QString peerName
QByteArray receivedHeaderFragment
bool readNotificationActivated
bool writeNotificationActivated
bool readNotificationPending
bool writeNotificationPending
bool connectionNotificationPending
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 155 of file qsocks5socketengine_p.h.

Member Enumeration Documentation

◆ Socks5Error

Enumerator
SocksFailure 
ConnectionNotAllowed 
NetworkUnreachable 
HostUnreachable 
ConnectionRefused 
TTLExpired 
CommandNotSupported 
AddressTypeNotSupported 
LastKnownError 
UnknownError 

Definition at line 189 of file qsocks5socketengine_p.h.

◆ Socks5Mode

Enumerator
NoMode 
ConnectMode 
BindMode 
UdpAssociateMode 

Definition at line 180 of file qsocks5socketengine_p.h.

◆ Socks5State

Enumerator
Uninitialized 
ConnectError 
AuthenticationMethodsSent 
Authenticating 
AuthenticatingError 
RequestMethodSent 
RequestError 
Connected 
UdpAssociateSuccess 
BindSuccess 
ControlSocketError 
SocksError 
HostNameLookupError 

Definition at line 162 of file qsocks5socketengine_p.h.

Constructor & Destructor Documentation

◆ QSocks5SocketEnginePrivate()

◆ ~QSocks5SocketEnginePrivate()

QSocks5SocketEnginePrivate::~QSocks5SocketEnginePrivate ( )

Definition at line 494 of file qsocks5socketengine.cpp.

Member Function Documentation

◆ _q_controlSocketBytesWritten()

void QSocks5SocketEnginePrivate::_q_controlSocketBytesWritten ( )

Definition at line 1187 of file qsocks5socketengine.cpp.

References Connected, ConnectMode, QSocks5Data::controlSocket, data, emitWriteNotification(), MaxWriteBufferSize, mode, socks5State, and writeNotificationActivated.

Here is the call graph for this function:

◆ _q_controlSocketConnected()

void QSocks5SocketEnginePrivate::_q_controlSocketConnected ( )

Definition at line 1126 of file qsocks5socketengine.cpp.

References AuthenticationMethodsSent, QSocks5Data::authenticator, QSocks5Data::controlSocket, data, QSocks5Authenticator::methodId(), and socks5State.

Here is the call graph for this function:

◆ _q_controlSocketDisconnected()

void QSocks5SocketEnginePrivate::_q_controlSocketDisconnected ( )

Definition at line 1232 of file qsocks5socketengine.cpp.

◆ _q_controlSocketErrorOccurred()

void QSocks5SocketEnginePrivate::_q_controlSocketErrorOccurred ( QAbstractSocket::SocketError error)

Definition at line 1201 of file qsocks5socketengine.cpp.

References Authenticating, AuthenticationMethodsSent, connectData, ConnectError, QSocks5Data::controlSocket, ControlSocketError, data, emitConnectionNotification(), emitReadNotification(), emitWriteNotification(), readNotificationPending, RequestMethodSent, setErrorState(), socks5State, and Uninitialized.

Here is the call graph for this function:

◆ _q_controlSocketReadNotification()

void QSocks5SocketEnginePrivate::_q_controlSocketReadNotification ( )

Definition at line 1137 of file qsocks5socketengine.cpp.

References _q_controlSocketReadNotification(), Authenticating, AuthenticationMethodsSent, QSocks5Data::authenticator, BindMode, BindSuccess, connectData, Connected, QSocks5Data::controlSocket, data, emitReadNotification(), mode, parseAuthenticatingReply(), parseAuthenticationMethodReply(), parseRequestMethodReply(), RequestMethodSent, and socks5State.

Referenced by _q_controlSocketReadNotification().

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

◆ _q_controlSocketStateChanged()

void QSocks5SocketEnginePrivate::_q_controlSocketStateChanged ( QAbstractSocket::SocketState state)

Definition at line 1237 of file qsocks5socketengine.cpp.

◆ _q_emitPendingConnectionNotification()

void QSocks5SocketEnginePrivate::_q_emitPendingConnectionNotification ( )

Definition at line 927 of file qsocks5socketengine.cpp.

References connectionNotificationPending.

◆ _q_emitPendingReadNotification()

void QSocks5SocketEnginePrivate::_q_emitPendingReadNotification ( )

Definition at line 876 of file qsocks5socketengine.cpp.

References connectData, emitReadNotification(), readNotificationEnabled, and readNotificationPending.

Here is the call graph for this function:

◆ _q_emitPendingWriteNotification()

void QSocks5SocketEnginePrivate::_q_emitPendingWriteNotification ( )

Definition at line 906 of file qsocks5socketengine.cpp.

References writeNotificationEnabled, and writeNotificationPending.

◆ _q_udpSocketReadNotification()

void QSocks5SocketEnginePrivate::_q_udpSocketReadNotification ( )

Definition at line 1243 of file qsocks5socketengine.cpp.

References QSocks5Data::authenticator, data, emitReadNotification(), and udpData.

Here is the call graph for this function:

◆ emitConnectionNotification()

void QSocks5SocketEnginePrivate::emitConnectionNotification ( )

Definition at line 935 of file qsocks5socketengine.cpp.

References connectionNotificationPending.

Referenced by _q_controlSocketErrorOccurred(), parseAuthenticationMethodReply(), parseRequestMethodReply(), and reauthenticate().

Here is the caller graph for this function:

◆ emitReadNotification()

void QSocks5SocketEnginePrivate::emitReadNotification ( )

Definition at line 895 of file qsocks5socketengine.cpp.

References readNotificationActivated, readNotificationEnabled, and readNotificationPending.

Referenced by _q_controlSocketErrorOccurred(), _q_controlSocketReadNotification(), _q_emitPendingReadNotification(), _q_udpSocketReadNotification(), and parseRequestMethodReply().

Here is the caller graph for this function:

◆ emitWriteNotification()

void QSocks5SocketEnginePrivate::emitWriteNotification ( )

Definition at line 916 of file qsocks5socketengine.cpp.

References writeNotificationActivated, writeNotificationEnabled, and writeNotificationPending.

Referenced by _q_controlSocketBytesWritten(), and _q_controlSocketErrorOccurred().

Here is the caller graph for this function:

◆ initialize()

void QSocks5SocketEnginePrivate::initialize ( Socks5Mode socks5Mode)

Definition at line 498 of file qsocks5socketengine.cpp.

References QSocks5Authenticator::QSocks5Authenticator(), QSocks5Data::authenticator, bindData, BindMode, connectData, ConnectMode, data, mode, UdpAssociateMode, and udpData.

Here is the call graph for this function:

◆ parseAuthenticatingReply()

void QSocks5SocketEnginePrivate::parseAuthenticatingReply ( )

Definition at line 735 of file qsocks5socketengine.cpp.

References QSocks5Data::authenticator, QSocks5Authenticator::continueAuthenticate(), QSocks5Data::controlSocket, data, reauthenticate(), and sendRequestMethod().

Referenced by _q_controlSocketReadNotification().

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

◆ parseAuthenticationMethodReply()

void QSocks5SocketEnginePrivate::parseAuthenticationMethodReply ( )

Definition at line 700 of file qsocks5socketengine.cpp.

References Authenticating, QSocks5Data::authenticator, QSocks5Authenticator::beginAuthenticate(), QSocks5Data::controlSocket, data, emitConnectionNotification(), QSocks5Authenticator::methodId(), reauthenticate(), sendRequestMethod(), setErrorState(), socks5State, and SocksError.

Referenced by _q_controlSocketReadNotification().

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

◆ parseNewConnection()

void QSocks5SocketEnginePrivate::parseNewConnection ( )

◆ parseRequestMethodReply()

void QSocks5SocketEnginePrivate::parseRequestMethodReply ( )

Definition at line 791 of file qsocks5socketengine.cpp.

References QSocks5Data::authenticator, bindData, BindMode, BindSuccess, Connected, ConnectMode, QSocks5Data::controlSocket, data, emitConnectionNotification(), emitReadNotification(), HostNameLookupError, QAbstractSocketEnginePrivate::inboundStreamCount, mode, QAbstractSocketEnginePrivate::outboundStreamCount, RequestError, RequestMethodSent, setErrorState(), socks5State, SocksError, and UdpAssociateSuccess.

Referenced by _q_controlSocketReadNotification().

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

◆ reauthenticate()

void QSocks5SocketEnginePrivate::reauthenticate ( )

Definition at line 668 of file qsocks5socketengine.cpp.

References AuthenticatingError, QSocks5Data::authenticator, QSocks5Data::controlSocket, data, emitConnectionNotification(), setErrorState(), socks5State, and Uninitialized.

Referenced by parseAuthenticatingReply(), and parseAuthenticationMethodReply().

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

◆ sendRequestMethod()

void QSocks5SocketEnginePrivate::sendRequestMethod ( )

Definition at line 746 of file qsocks5socketengine.cpp.

References QSocks5Data::authenticator, BindMode, ConnectMode, QSocks5Data::controlSocket, data, mode, RequestMethodSent, and socks5State.

Referenced by parseAuthenticatingReply(), and parseAuthenticationMethodReply().

Here is the caller graph for this function:

◆ setErrorState() [1/2]

◆ setErrorState() [2/2]

void QSocks5SocketEnginePrivate::setErrorState ( Socks5State state,
Socks5Error socks5error )

Definition at line 622 of file qsocks5socketengine.cpp.

References setErrorState().

Referenced by _q_controlSocketErrorOccurred(), parseAuthenticationMethodReply(), parseRequestMethodReply(), reauthenticate(), setErrorState(), and waitForConnected().

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

◆ waitForConnected()

bool QSocks5SocketEnginePrivate::waitForConnected ( QDeadlineTimer deadline,
bool * timedOut )

Definition at line 1680 of file qsocks5socketengine.cpp.

References BindMode, BindSuccess, Connected, ConnectMode, QSocks5Data::controlSocket, ControlSocketError, data, mode, setErrorState(), socks5State, and UdpAssociateSuccess.

Here is the call graph for this function:

Member Data Documentation

◆ bindData

QSocks5BindData* QSocks5SocketEnginePrivate::bindData

◆ connectData

◆ connectionNotificationPending

bool QSocks5SocketEnginePrivate::connectionNotificationPending

◆ data

◆ exceptNotificationEnabled

bool QSocks5SocketEnginePrivate::exceptNotificationEnabled

Definition at line 229 of file qsocks5socketengine_p.h.

Referenced by QSocks5SocketEnginePrivate().

◆ mode

◆ peerName

QString QSocks5SocketEnginePrivate::peerName

Definition at line 239 of file qsocks5socketengine_p.h.

◆ proxyInfo

QNetworkProxy QSocks5SocketEnginePrivate::proxyInfo

Definition at line 227 of file qsocks5socketengine_p.h.

◆ readNotificationActivated

bool QSocks5SocketEnginePrivate::readNotificationActivated
mutable

Definition at line 242 of file qsocks5socketengine_p.h.

Referenced by QSocks5SocketEnginePrivate(), and emitReadNotification().

◆ readNotificationEnabled

bool QSocks5SocketEnginePrivate::readNotificationEnabled

◆ readNotificationPending

bool QSocks5SocketEnginePrivate::readNotificationPending

◆ receivedHeaderFragment

QByteArray QSocks5SocketEnginePrivate::receivedHeaderFragment

Definition at line 240 of file qsocks5socketengine_p.h.

◆ socketDescriptor

qintptr QSocks5SocketEnginePrivate::socketDescriptor

Definition at line 231 of file qsocks5socketengine_p.h.

◆ socks5State

◆ udpData

QSocks5UdpAssociateData* QSocks5SocketEnginePrivate::udpData

◆ writeNotificationActivated

bool QSocks5SocketEnginePrivate::writeNotificationActivated
mutable

◆ writeNotificationEnabled

bool QSocks5SocketEnginePrivate::writeNotificationEnabled

◆ writeNotificationPending

bool QSocks5SocketEnginePrivate::writeNotificationPending

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