Qt 4.8
Public Functions | List of all members
QSocks5SocketEngineHandler Class Reference

#include <qsocks5socketengine_p.h>

Inheritance diagram for QSocks5SocketEngineHandler:
QSocketEngineHandler

Public Functions

virtual QAbstractSocketEnginecreateSocketEngine (QAbstractSocket::SocketType socketType, const QNetworkProxy &, QObject *parent)
 
virtual QAbstractSocketEnginecreateSocketEngine (int socketDescripter, QObject *parent)
 

Additional Inherited Members

- Protected Functions inherited from QSocketEngineHandler
 QSocketEngineHandler ()
 
virtual ~QSocketEngineHandler ()
 

Detailed Description

Definition at line 288 of file qsocks5socketengine_p.h.

Functions

◆ createSocketEngine() [1/2]

QAbstractSocketEngine * QSocks5SocketEngineHandler::createSocketEngine ( QAbstractSocket::SocketType  socketType,
const QNetworkProxy proxy,
QObject parent 
)
virtual

Implements QSocketEngineHandler.

Definition at line 1903 of file qsocks5socketengine.cpp.

1905 {
1906  Q_UNUSED(socketType);
1907 
1908  // proxy type must have been resolved by now
1909  if (proxy.type() != QNetworkProxy::Socks5Proxy) {
1910  QSOCKS5_DEBUG << "not proxying";
1911  return 0;
1912  }
1914  engine->setProxy(proxy);
1915  return engine.take();
1916 }
QNetworkProxy::ProxyType type() const
Returns the proxy type for this instance.
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
#define QSOCKS5_DEBUG

◆ createSocketEngine() [2/2]

QAbstractSocketEngine * QSocks5SocketEngineHandler::createSocketEngine ( int  socketDescripter,
QObject parent 
)
virtual

Implements QSocketEngineHandler.

Definition at line 1918 of file qsocks5socketengine.cpp.

1919 {
1920  QSOCKS5_DEBUG << "createSocketEngine" << socketDescriptor;
1921  if (socks5BindStore()->contains(socketDescriptor)) {
1922  QSOCKS5_DEBUG << "bind store contains" << socketDescriptor;
1923  return new QSocks5SocketEngine(parent);
1924  }
1925  return 0;
1926 }
#define QSOCKS5_DEBUG

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