ksockssocketdevice.h
/* -*- C++ -*-
* Copyright (C) 2004 Thiago Macieira <thiago.macieira@kdemail.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KSOCKSSOCKETDEVICE_H
#define KSOCKSSOCKETDEVICE_H
#include "ksocketdevice.h"
namespace KNetwork {
class KDECORE_EXPORT KSocksSocketDevice: public KSocketDevice
{
public:
KSocksSocketDevice(const KSocketBase* = 0L);
explicit 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);
private:
static void initSocks();
friend class KSocketDevice;
};
} // namespace KNetwork
#endif
KNetwork::KResolverEntry
One resolution entry.
Definition: kresolver.h:66
KNetwork::KSocketAddress
A generic socket address.
Definition: ksocketaddress.h:423
KNetwork::KSocksSocketDevice
The low-level class for SOCKS proxying.
Definition: ksockssocketdevice.h:40
KNetwork::KSocketDevice
Low-level socket functionality.
Definition: ksocketdevice.h:50
KNetwork::KSocketBase
Basic socket functionality.
Definition: ksocketbase.h:97

KDE Home | KDE Accessibility Home | Description of Access Keys