.TH "KSocks" 3 "28 Jan 2004" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KSocks \- This class provides you with an interface to a \fCSOCKS\fP Proxy server. Access to a SOCKS Proxy.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <ksocks.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "void \fBdisableSocks\fP ()"
.br
.RI "\fIDisable the use of SOCKS immediately. \fP"
.ti -1c
.RI "void \fBenableSocks\fP ()"
.br
.RI "\fIEnable the use of SOCKS immediately if \fBhasSocks()\fP is true. \fP"
.ti -1c
.RI "bool \fBusingSocks\fP ()"
.br
.RI "\fIChecks whether SOCKS is currently being used. \fP"
.ti -1c
.RI "bool \fBhasSocks\fP ()"
.br
.RI "\fIChecks whether SOCKS is available for use. \fP"
.ti -1c
.RI "bool \fBhasWorkingAsyncConnect\fP ()"
.br
.RI "\fIReturns whether asynchronous connects work with the selected SOCKS impementation. \fP"
.ti -1c
.RI "int \fBconnect\fP (int sockfd, const  sockaddr *serv_addr, ksocklen_t addrlen)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "signed long int \fBread\fP (int fd, void *buf, unsigned long int count)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "signed long int \fBwrite\fP (int fd, const  void *buf, unsigned long int count)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBrecvfrom\fP (int s, void *buf, unsigned long int len, int flags, sockaddr *from, ksocklen_t *fromlen)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBsendto\fP (int s, const  void *msg, unsigned long int len, int flags, const  sockaddr *to, ksocklen_t tolen)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBrecv\fP (int s, void *buf, unsigned long int len, int flags)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBsend\fP (int s, const  void *msg, unsigned long int len, int flags)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBgetsockname\fP (int s, sockaddr *name, ksocklen_t *namelen)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBgetpeername\fP (int s, sockaddr *name, ksocklen_t *namelen)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBaccept\fP (int s, sockaddr *addr, ksocklen_t *addrlen)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBselect\fP (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBlisten\fP (int s, int backlog)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "int \fBbind\fP (int sockfd, sockaddr *my_addr, ksocklen_t addrlen)"
.br
.RI "\fIThis is the re-implementation of libc's function of the same name. \fP"
.ti -1c
.RI "void \fBdie\fP ()"
.br
.RI "\fIIf you're using this, you're probably doing something wrong. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKSocks\fP * \fBself\fP ()"
.br
.RI "\fIReturn an instance of class KSocks *. \fP"
.ti -1c
.RI "bool \fBactivated\fP ()"
.br
.RI "\fIChecks whether KSocks has been started (ie someone called \fBself()\fP). \fP"
.ti -1c
.RI "void \fBdisable\fP ()"
.br
.RI "\fISet this before the first call to \fBKSocks::self()\fP and it will fail to initialize SOCKS. \fP"
.ti -1c
.RI "void \fBsetConfig\fP (\fBKConfigBase\fP *config)"
.br
.RI "\fISet this before the first call to \fBKSocks::self()\fP and it will use \fCconfig\fP to read its configuration from. \fP"
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKStaticDeleter< KSocks >\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class provides you with an interface to a \fCSOCKS\fP Proxy server. Access to a SOCKS Proxy. 

A SOCKS server is able to provide full internet access behind a firewall. KSocks is a singleton; there can only be one instance at any given time. To obtain a reference to that instance, use \fBself\fP().
.PP
Definition at line 44 of file ksocks.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBKSocks\fP * KSocks::self ()\fC [static]\fP"
.PP
Return an instance of class KSocks *. You cannot delete this object. It is a singleton class. 
.PP
\fBReturns:\fP
.RS 4
the KSock instance 
.RE
.PP
Definition at line 207 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::accept(), KExtendedSocket::connect(), KExtendedSocket::flush(), KSocket::KSocket(), KExtendedSocket::listen(), KExtendedSocket::localAddress(), KExtendedSocket::peerAddress(), KExtendedSocket::readBlock(), KExtendedSocket::waitForMore(), and KExtendedSocket::writeBlock().
.SS "bool KSocks::activated ()\fC [static]\fP"
.PP
Checks whether KSocks has been started (ie someone called \fBself()\fP). \fBReturns:\fP
.RS 4
true if activated 
.RE
.PP
Definition at line 234 of file ksocks.cpp.
.SS "void KSocks::disableSocks ()"
.PP
Disable the use of SOCKS immediately. Definition at line 447 of file ksocks.cpp.
.SS "void KSocks::enableSocks ()"
.PP
Enable the use of SOCKS immediately if \fBhasSocks()\fP is true. Definition at line 452 of file ksocks.cpp.
.SS "bool KSocks::usingSocks ()"
.PP
Checks whether SOCKS is currently being used. \fBReturns:\fP
.RS 4
true if SOCKS is currently being used. 
.RE
.PP
Definition at line 437 of file ksocks.cpp.
.SS "bool KSocks::hasSocks ()"
.PP
Checks whether SOCKS is available for use. \fBReturns:\fP
.RS 4
true if SOCKS is available for use. 
.RE
.PP
Definition at line 442 of file ksocks.cpp.
.SS "bool KSocks::hasWorkingAsyncConnect ()"
.PP
Returns whether asynchronous connects work with the selected SOCKS impementation. Definition at line 457 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::connect().
.SS "int KSocks::connect (int sockfd, const sockaddr * serv_addr, ksocklen_t addrlen)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 468 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::connect().
.SS "signed long int KSocks::read (int fd, void * buf, unsigned long int count)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 476 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::readBlock().
.SS "signed long int KSocks::write (int fd, const void * buf, unsigned long int count)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 483 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::flush(), and KExtendedSocket::writeBlock().
.SS "int KSocks::recvfrom (int s, void * buf, unsigned long int len, int flags, sockaddr * from, ksocklen_t * fromlen)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 490 of file ksocks.cpp.
.SS "int KSocks::sendto (int s, const void * msg, unsigned long int len, int flags, const sockaddr * to, ksocklen_t tolen)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 503 of file ksocks.cpp.
.SS "int KSocks::recv (int s, void * buf, unsigned long int len, int flags)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 511 of file ksocks.cpp.
.SS "int KSocks::send (int s, const void * msg, unsigned long int len, int flags)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 518 of file ksocks.cpp.
.SS "int KSocks::getsockname (int s, sockaddr * name, ksocklen_t * namelen)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 525 of file ksocks.cpp.
.PP
References KStdAction::name().
.PP
Referenced by KSocket::KSocket(), and KExtendedSocket::localAddress().
.SS "int KSocks::getpeername (int s, sockaddr * name, ksocklen_t * namelen)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 537 of file ksocks.cpp.
.PP
References KStdAction::name().
.PP
Referenced by KExtendedSocket::peerAddress().
.SS "int KSocks::accept (int s, sockaddr * addr, ksocklen_t * addrlen)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 549 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::accept().
.SS "int KSocks::select (int n, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval * timeout)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 561 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::accept(), KExtendedSocket::connect(), and KExtendedSocket::waitForMore().
.SS "int KSocks::listen (int s, int backlog)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 569 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::listen().
.SS "int KSocks::bind (int sockfd, sockaddr * my_addr, ksocklen_t addrlen)"
.PP
This is the re-implementation of libc's function of the same name. Read the appropriate man page. Definition at line 576 of file ksocks.cpp.
.PP
Referenced by KExtendedSocket::connect(), and KExtendedSocket::listen().
.SS "void KSocks::die ()"
.PP
If you're using this, you're probably doing something wrong. Please don't use it. Definition at line 414 of file ksocks.cpp.
.SS "void KSocks::disable ()\fC [static]\fP"
.PP
Set this before the first call to \fBKSocks::self()\fP and it will fail to initialize SOCKS. Definition at line 201 of file ksocks.cpp.
.SS "void KSocks::setConfig (\fBKConfigBase\fP * config)\fC [static]\fP"
.PP
Set this before the first call to \fBKSocks::self()\fP and it will use \fCconfig\fP to read its configuration from. Definition at line 221 of file ksocks.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
