ksockssocketdevice.cpp
193 static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, TDESocketAddress* from, ssize_t &retval, bool peek = false)
199 retval = KSocks::self()->recvfrom(sockfd, data, maxlen, peek ? MSG_PEEK : 0, from->address(), &len);
306 TQ_LONG KSocksSocketDevice::writeBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to)
void setError(int status, SocketError error)
Sets the socket's error code and the I/O Device's status.
Definition: tdesocketbase.cpp:309
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: tdesocketbase.cpp:315
TQ_UINT16 length() const
Retrieves the length of the socket address structure.
Definition: kresolver.cpp:148
TDESocketAddress address() const
Retrieves the socket address associated with this entry.
Definition: kresolver.cpp:142
The low-level class for SOCKS proxying.
Definition: ksockssocketdevice.h:41
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Overrides peeking.
Definition: ksockssocketdevice.cpp:259
virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len)
Overrides writing.
Definition: ksockssocketdevice.cpp:301
virtual TDESocketAddress localAddress() const
Overrides getting socket address.
Definition: ksockssocketdevice.cpp:328
virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen)
Overrides reading.
Definition: ksockssocketdevice.cpp:217
virtual bool connect(const KResolverEntry &address)
Overrides connection.
Definition: ksockssocketdevice.cpp:119
virtual bool poll(bool *input, bool *output, bool *exception=0L, int timeout=-1, bool *timedout=0L)
Overrides polling.
Definition: ksockssocketdevice.cpp:392
virtual TDESocketAddress externalAddress() const
Overrides getting external address.
Definition: ksockssocketdevice.cpp:386
virtual bool bind(const KResolverEntry &address)
Overrides binding.
Definition: ksockssocketdevice.cpp:73
virtual TDESocketAddress peerAddress() const
Overrides getting peer address.
Definition: ksockssocketdevice.cpp:357
TDESocketAddress & setLength(TQ_UINT16 len)
Sets the length of this socket structure.
Definition: tdesocketaddress.cpp:492
const sockaddr * address() const
Returns the socket address structure, to be passed down to low level functions.
Definition: tdesocketaddress.cpp:461
TQ_UINT16 length() const
Returns the length of this socket address structure.
Definition: tdesocketaddress.cpp:485
virtual bool setBlocking(bool enable)
Sets this socket's blocking mode.
Definition: tdesocketbase.cpp:76
This class provides functionality for creating and registering socket implementations.
Definition: tdesocketdevice.h:417
static TDESocketDeviceFactoryBase * setDefaultImpl(TDESocketDeviceFactoryBase *factory)
Sets the default TDESocketDevice implementation to use and return the old factory.
Definition: tdesocketdevice.cpp:871
static void addNewImpl(TDESocketDeviceFactoryBase *factory, int capabilities)
Adds a factory of TDESocketDevice objects to the list, along with its capabilities flag.
Definition: tdesocketdevice.cpp:879
virtual bool create(int family, int type, int protocol)
Creates a socket but don't connect or bind anywhere.
Definition: tdesocketdevice.cpp:201
int recvfrom(int s, void *buf, unsigned long int len, int flags, sockaddr *from, ksocklen_t *fromlen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:501
int sendto(int s, const void *msg, unsigned long int len, int flags, const sockaddr *to, ksocklen_t tolen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:514
int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:572
int accept(int s, sockaddr *addr, ksocklen_t *addrlen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:560
int connect(int sockfd, const sockaddr *serv_addr, ksocklen_t addrlen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:479
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36