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

KDECore

ksockssocketdevice.h

Go to the documentation of this file.
00001 /*  -*- C++ -*-
00002  *  Copyright (C) 2004 Thiago Macieira <thiago.macieira@kdemail.net>
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 "ksocketdevice.h"
00024 
00025 namespace KNetwork {
00026 
00040 class KDECORE_EXPORT KSocksSocketDevice: public KSocketDevice
00041 {
00042 public:
00046   KSocksSocketDevice(const KSocketBase* = 0L);
00047 
00051   explicit KSocksSocketDevice(int fd);
00052 
00056   virtual ~KSocksSocketDevice();
00057 
00061   virtual int capabilities() const;
00062 
00066   virtual bool bind(const KResolverEntry& address);
00067 
00071   virtual bool listen(int backlog);
00072 
00076   virtual bool connect(const KResolverEntry& address);
00077 
00081   virtual KSocksSocketDevice* accept();
00082 
00086   virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
00087   virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
00088 
00092   virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
00093   virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
00094 
00098   virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
00099   virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
00100 
00104   virtual KSocketAddress localAddress() const;
00105 
00109   virtual KSocketAddress peerAddress() const;
00110 
00114   virtual KSocketAddress externalAddress() const;
00115 
00119   virtual bool poll(bool* input, bool* output, bool* exception = 0L,
00120             int timeout = -1, bool* timedout = 0L);
00121 
00122 private:
00123   static void initSocks();
00124   friend class KSocketDevice;
00125 };
00126 
00127 }               // namespace KNetwork
00128 
00129 #endif

KDECore

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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