KNetwork::KSocksSocketDevice Class Reference
The low-level class for SOCKS proxying. More...
#include <ksockssocketdevice.h>
Inheritance diagram for KNetwork::KSocksSocketDevice:

Public Member Functions | |
KSocksSocketDevice (const KSocketBase *=0L) | |
KSocksSocketDevice (int fd) | |
virtual | ~KSocksSocketDevice () |
virtual int | capabilities () const |
virtual bool | bind (const KResolverEntry &address) |
virtual bool | listen (int backlog) |
virtual bool | connect (const KResolverEntry &address) |
virtual KSocksSocketDevice * | accept () |
virtual Q_LONG | readBlock (char *data, Q_ULONG maxlen) |
virtual Q_LONG | readBlock (char *data, Q_ULONG maxlen, KSocketAddress &from) |
virtual Q_LONG | peekBlock (char *data, Q_ULONG maxlen) |
virtual Q_LONG | peekBlock (char *data, Q_ULONG maxlen, KSocketAddress &from) |
virtual Q_LONG | writeBlock (const char *data, Q_ULONG len) |
virtual Q_LONG | writeBlock (const char *data, Q_ULONG len, const KSocketAddress &to) |
virtual KSocketAddress | localAddress () const |
virtual KSocketAddress | peerAddress () const |
virtual KSocketAddress | externalAddress () const |
virtual bool | poll (bool *input, bool *output, bool *exception=0L, int timeout=-1, bool *timedout=0L) |
Detailed Description
The low-level class for SOCKS proxying.This class reimplements several functions from KSocketDevice in order to implement SOCKS support.
This works by using KSocks.
- Author:
- Thiago Macieira <thiago.macieira@kdemail.net>
- Warning:
- This code is untested!
Definition at line 40 of file ksockssocketdevice.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 41 of file ksockssocketdevice.cpp. Referenced by accept(). |
|
Construct from a file descriptor.
Definition at line 48 of file ksockssocketdevice.cpp. |
|
Destructor.
Definition at line 55 of file ksockssocketdevice.cpp. |
Member Function Documentation
|
Sets our capabilities.
Reimplemented from KNetwork::KSocketDevice. Definition at line 60 of file ksockssocketdevice.cpp. |
|
Overrides binding.
Reimplemented from KNetwork::KSocketDevice. Definition at line 68 of file ksockssocketdevice.cpp. References KNetwork::KResolverEntry::address(), KSocks::bind(), KNetwork::KSocketDevice::create(), KNetwork::KResolverEntry::length(), KNetwork::KActiveSocketBase::resetError(), KSocks::self(), and KNetwork::KActiveSocketBase::setError(). |
|
Overrides listening.
Reimplemented from KNetwork::KSocketDevice. Definition at line 92 of file ksockssocketdevice.cpp. References KSocks::listen(), KNetwork::KActiveSocketBase::resetError(), KSocks::self(), and KNetwork::KActiveSocketBase::setError(). |
|
Overrides connection.
Reimplemented from KNetwork::KSocketDevice. Definition at line 114 of file ksockssocketdevice.cpp. References KNetwork::KResolverEntry::address(), KSocks::connect(), KNetwork::KSocketDevice::create(), KNetwork::KResolverEntry::length(), KNetwork::KActiveSocketBase::resetError(), KSocks::self(), and KNetwork::KActiveSocketBase::setError(). |
|
Overrides accepting. The return type is specialised. Reimplemented from KNetwork::KSocketDevice. Definition at line 148 of file ksockssocketdevice.cpp. References KSocks::accept(), KSocksSocketDevice(), KSocks::self(), and KNetwork::KActiveSocketBase::setError(). |
|
Overrides reading.
Reimplemented from KNetwork::KSocketDevice. Definition at line 196 of file ksockssocketdevice.cpp. References KNetwork::KActiveSocketBase::resetError(), and KNetwork::KActiveSocketBase::setError(). |
|
Reads data and the source address from this socket.
Reimplemented from KNetwork::KSocketDevice. Definition at line 217 of file ksockssocketdevice.cpp. References KNetwork::KActiveSocketBase::resetError(), and KNetwork::KActiveSocketBase::setError(). |
|
Overrides peeking.
Reimplemented from KNetwork::KSocketDevice. Definition at line 238 of file ksockssocketdevice.cpp. References KNetwork::KActiveSocketBase::resetError(), and KNetwork::KActiveSocketBase::setError(). |
|
Peeks the data in the socket and the source address.
Reimplemented from KNetwork::KSocketDevice. Definition at line 259 of file ksockssocketdevice.cpp. References KNetwork::KActiveSocketBase::resetError(), and KNetwork::KActiveSocketBase::setError(). |
|
Overrides writing.
Reimplemented from KNetwork::KSocketDevice. Definition at line 280 of file ksockssocketdevice.cpp. |
|
Writes the given data to the given destination address.
Reimplemented from KNetwork::KSocketDevice. Definition at line 285 of file ksockssocketdevice.cpp. References KNetwork::KSocketAddress::address(), KNetwork::KSocketAddress::length(), KNetwork::KActiveSocketBase::resetError(), KSocks::self(), KSocks::sendto(), and KNetwork::KActiveSocketBase::setError(). |
|
Overrides getting socket address.
Reimplemented from KNetwork::KSocketDevice. Definition at line 307 of file ksockssocketdevice.cpp. References KNetwork::KSocketAddress::address(), KSocks::getsockname(), KNetwork::KSocketAddress::length(), KSocks::self(), and KNetwork::KSocketAddress::setLength(). |
|
Overrides getting peer address.
Reimplemented from KNetwork::KSocketDevice. Definition at line 336 of file ksockssocketdevice.cpp. References KNetwork::KSocketAddress::address(), KSocks::getpeername(), KNetwork::KSocketAddress::length(), KSocks::self(), and KNetwork::KSocketAddress::setLength(). |
|
Overrides getting external address.
Reimplemented from KNetwork::KSocketDevice. Definition at line 365 of file ksockssocketdevice.cpp. |
|
Overrides polling.
Reimplemented from KNetwork::KSocketDevice. Definition at line 371 of file ksockssocketdevice.cpp. References KNetwork::KActiveSocketBase::resetError(), KSocks::select(), KSocks::self(), and KNetwork::KActiveSocketBase::setError(). |
The documentation for this class was generated from the following files: