libktorrent
2.1.1
|
#include <socks.h>
Public Types | |
enum | SetupState { NONE, AUTH_REQUEST_SENT, USERNAME_AND_PASSWORD_SENT, CONNECT_REQUEST_SENT } |
enum | State { IDLE, CONNECTING_TO_SERVER, CONNECTING_TO_HOST, CONNECTED, FAILED } |
Public Member Functions | |
Socks (mse::EncryptedPacketSocket::Ptr sock, const Address &dest) | |
State | onReadyToRead () |
State | onReadyToWrite () |
State | setup () |
Setup a socks connection, return the current state. | |
Static Public Member Functions | |
static bool | enabled () |
Is socks enabled. | |
static void | setSocksAuthentication (const QString &username, const QString &password) |
static void | setSocksEnabled (bool on) |
Enable or disable socks. | |
static void | setSocksServerAddress (const QString &host, bt::Uint16 port) |
Set the socks server address. | |
static void | setSocksVersion (int version) |
Set the socks version (4 or 5) | |
State net::Socks::onReadyToRead | ( | ) |
There is data available on the socked
State net::Socks::onReadyToWrite | ( | ) |
The socket is ready to write (used to determine if we are connected to the server)
|
static |
Set the SOCKSv5 Username and password
username | The username |
password | The password |