• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

k3sockssocketdevice.h

Go to the documentation of this file.
00001 /*  -*- C++ -*-
00002  *  Copyright (C) 2004,2005 Thiago Macieira <thiago@kde.org>
00003  *
00004  *  This library is free software; you can redistribute it and/or
00005  *  modify it under the terms of the GNU Library General Public
00006  *  License as published by the Free Software Foundation; either
00007  *  version 2 of the License, or (at your option) any later version.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KSOCKSSOCKETDEVICE_H
00021 #define KSOCKSSOCKETDEVICE_H
00022 
00023 #include "k3socketdevice.h"
00024 
00025 namespace KNetwork {
00026 
00027 class KSocksSocketDevicePrivate;
00041 class KDECORE_EXPORT KSocksSocketDevice: public KSocketDevice
00042 {
00043 public:
00047   KSocksSocketDevice(const KSocketBase* = 0L);
00048 
00052   explicit KSocksSocketDevice(int fd);
00053 
00057   virtual ~KSocksSocketDevice();
00058 
00062   virtual int capabilities() const;
00063 
00067   virtual bool bind(const KResolverEntry& address);
00068 
00072   virtual bool listen(int backlog);
00073 
00077   virtual bool connect(const KResolverEntry& address);
00078 
00082   virtual KSocksSocketDevice* accept();
00083 
00087   virtual qint64 readBlock(char *data, quint64 maxlen);
00088 
00095   virtual qint64 readBlock(char *data, quint64 maxlen, KSocketAddress& from);
00096 
00100   virtual qint64 peekBlock(char *data, quint64 maxlen);
00101 
00105   virtual qint64 peekBlock(char *data, quint64 maxlen, KSocketAddress& from);
00106 
00110   virtual qint64 writeBlock(const char *data, quint64 len);
00111 
00115   virtual qint64 writeBlock(const char *data, quint64 len, const KSocketAddress& to);
00116 
00120   virtual KSocketAddress localAddress() const;
00121 
00125   virtual KSocketAddress peerAddress() const;
00126 
00130   virtual KSocketAddress externalAddress() const;
00131 
00135   virtual bool poll(bool* input, bool* output, bool* exception = 0L,
00136             int timeout = -1, bool* timedout = 0L);
00137 
00138 private:
00139   static void initSocks();
00140   friend class KSocketDevice;
00141   KSocksSocketDevicePrivate * const d;
00142 };
00143 
00144 }               // namespace KNetwork
00145 
00146 #endif

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal