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

tdecore

  • tdecore
ksocks.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2001 George Staikos <staikos@kde.org>
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 version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18#ifndef _KSOCKS_H_
19#define _KSOCKS_H_
20
21#include <tqstringlist.h>
22#include <sys/types.h>
23#include <sys/time.h>
24#include <kstaticdeleter.h>
25#include <tdelibs_export.h>
26
27#ifdef Q_OS_UNIX
28
29class KSocksTable;
30class KSocksPrivate;
31class KLibrary;
32class TDEConfigBase;
33struct sockaddr;
34
35typedef unsigned ksocklen_t;
36
37
48class TDECORE_EXPORT KSocks {
49 friend class KStaticDeleter<KSocks>;
50
51public:
52
58 static KSocks *self();
59
64 static bool activated();
65
69 void disableSocks();
70
74 void enableSocks();
75
80 bool usingSocks();
81
86 bool hasSocks();
87
92 bool hasWorkingAsyncConnect();
93
94 /*
95 ** REIMPLEMENTATIONS OF LIBC SOCKET FUNCTIONS
96 **/
101 int connect (int sockfd, const sockaddr *serv_addr,
102 ksocklen_t addrlen);
107 signed long int read (int fd, void *buf, unsigned long int count);
112 signed long int write (int fd, const void *buf, unsigned long int count);
117 int recvfrom (int s, void *buf, unsigned long int len, int flags,
118 sockaddr *from, ksocklen_t *fromlen);
123 int sendto (int s, const void *msg, unsigned long int len, int flags,
124 const sockaddr *to, ksocklen_t tolen);
129 int recv (int s, void *buf, unsigned long int len, int flags);
134 int send (int s, const void *msg, unsigned long int len, int flags);
139 int getsockname (int s, sockaddr *name, ksocklen_t *namelen);
144 int getpeername (int s, sockaddr *name, ksocklen_t *namelen);
149 int accept (int s, sockaddr *addr, ksocklen_t *addrlen);
154 int select (int n, fd_set *readfds, fd_set *writefds,
155 fd_set *exceptfds, struct timeval *timeout);
160 int listen (int s, int backlog);
161
166 int bind (int sockfd, sockaddr *my_addr,
167 ksocklen_t addrlen);
168 int bind (int sockfd, const sockaddr *my_addr,
169 ksocklen_t addrlen);
170
176 void die();
177
182 static void disable();
183
188 static void setConfig(TDEConfigBase *config);
189
190private:
191 KSocks(TDEConfigBase *config);
192 ~KSocks();
193
194 void stopSocks();
195
196 static KSocks *_me;
197 static bool _disabled;
198 TQStringList _libNames;
199 TQStringList _libPaths;
200 bool _useSocks, _hasSocks;
201 KLibrary* _socksLib;
202
203
204 KSocksTable *_st;
205 KSocksPrivate *d;
206};
207
208#endif //Q_OS_UNIX
209
210#endif //_KSOCKS_H_
KLibrary
Represents a dynamically loaded library.
Definition: klibloader.h:51
KSocks
This class provides you with an interface to a SOCKS Proxy server.
Definition: ksocks.h:48
KStaticDeleter
Little helper class to clean up static objects that are held as pointer.
Definition: kstaticdeleter.h:74
TDEConfigBase
KDE Configuration Management abstract base class.
Definition: tdeconfigbase.h:71

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.