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

tdecore

  • tdecore
  • network
ksockssocketdevice.h
1 /*
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 "tdesocketdevice.h"
24 
25 namespace KNetwork {
26 
40 class TDECORE_EXPORT KSocksSocketDevice: public TDESocketDevice
41 {
42 public:
46  KSocksSocketDevice(const TDESocketBase* = 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, TDESocketAddress& from);
88 
92  virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
93  virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& 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 TDESocketAddress& to);
100 
104  virtual TDESocketAddress localAddress() const;
105 
109  virtual TDESocketAddress peerAddress() const;
110 
114  virtual TDESocketAddress 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 TDESocketDevice;
125 };
126 
127 } // namespace KNetwork
128 
129 #endif
KNetwork::TDESocketAddress
A generic socket address.
Definition: tdesocketaddress.h:423
KNetwork::KResolverEntry
One resolution entry.
Definition: kresolver.h:66
KNetwork::TDESocketDevice
Low-level socket functionality.
Definition: tdesocketdevice.h:50
KNetwork
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36
KNetwork::KSocksSocketDevice
The low-level class for SOCKS proxying.
Definition: ksockssocketdevice.h:40
KNetwork::TDESocketBase
Basic socket functionality.
Definition: tdesocketbase.h:97

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.