• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
  • network
ksockssocketdevice.h
1 /* -*- C++ -*-
2  * Copyright (C) 2004 Thiago Macieira <thiago.macieira@kdemail.net>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef KSOCKSSOCKETDEVICE_H
21 #define KSOCKSSOCKETDEVICE_H
22 
23 #include "ksocketdevice.h"
24 
25 namespace KNetwork {
26 
40 class KDECORE_EXPORT KSocksSocketDevice: public KSocketDevice
41 {
42 public:
46  KSocksSocketDevice(const KSocketBase* = 0L);
47 
51  explicit KSocksSocketDevice(int fd);
52 
56  virtual ~KSocksSocketDevice();
57 
61  virtual int capabilities() const;
62 
66  virtual bool bind(const KResolverEntry& address);
67 
71  virtual bool listen(int backlog);
72 
76  virtual bool connect(const KResolverEntry& address);
77 
81  virtual KSocksSocketDevice* accept();
82 
86  virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen);
87  virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
88 
92  virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
93  virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
94 
98  virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len);
99  virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
100 
104  virtual KSocketAddress localAddress() const;
105 
109  virtual KSocketAddress peerAddress() const;
110 
114  virtual KSocketAddress externalAddress() const;
115 
119  virtual bool poll(bool* input, bool* output, bool* exception = 0L,
120  int timeout = -1, bool* timedout = 0L);
121 
122 private:
123  static void initSocks();
124  friend class KSocketDevice;
125 };
126 
127 } // namespace KNetwork
128 
129 #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

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |