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::tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to)
static void addNewImpl(TDESocketDeviceFactoryBase *factory, int capabilities)
Adds a factory of TDESocketDevice objects to the list, along with its capabilities flag...
Definition: tdesocketdevice.cpp:884
This class provides functionality for creating and registering socket implementations.
Definition: tdesocketdevice.h:421
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: tdesocketbase.cpp:315
virtual bool create(int family, int type, int protocol)
Creates a socket but don't connect or bind anywhere.
Definition: tdesocketdevice.cpp:201
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
virtual TDESocketAddress localAddress() const
Overrides getting socket address.
Definition: ksockssocketdevice.cpp:328
TDESocketAddress address() const
Retrieves the socket address associated with this entry.
Definition: kresolver.cpp:142
virtual bool bind(const KResolverEntry &address)
Overrides binding.
Definition: ksockssocketdevice.cpp:73
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36
The low-level class for SOCKS proxying.
Definition: ksockssocketdevice.h:40
TDESocketAddress & setLength(TQ_UINT16 len)
Sets the length of this socket structure.
Definition: tdesocketaddress.cpp:492
void setError(int status, SocketError error)
Sets the socket's error code and the I/O Device's status.
Definition: tdesocketbase.cpp:309
static TDESocketDeviceFactoryBase * setDefaultImpl(TDESocketDeviceFactoryBase *factory)
Sets the default TDESocketDevice implementation to use and return the old factory.
Definition: tdesocketdevice.cpp:876
virtual bool poll(bool *input, bool *output, bool *exception=0L, int timeout=-1, bool *timedout=0L)
Overrides polling.
Definition: ksockssocketdevice.cpp:392
TQ_UINT16 length() const
Retrieves the length of the socket address structure.
Definition: kresolver.cpp:148
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
virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len)
Overrides writing.
Definition: ksockssocketdevice.cpp:301
const sockaddr * address() const
Returns the socket address structure, to be passed down to low level functions.
Definition: tdesocketaddress.cpp:461
virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen)
Overrides reading.
Definition: ksockssocketdevice.cpp:217
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
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Overrides peeking.
Definition: ksockssocketdevice.cpp:259
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
virtual bool setBlocking(bool enable)
Sets this socket's blocking mode.
Definition: tdesocketbase.cpp:76
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
virtual TDESocketAddress externalAddress() const
Overrides getting external address.
Definition: ksockssocketdevice.cpp:386
virtual TDESocketAddress peerAddress() const
Overrides getting peer address.
Definition: ksockssocketdevice.cpp:357
TQ_UINT16 length() const
Returns the length of this socket address structure.
Definition: tdesocketaddress.cpp:485
virtual bool connect(const KResolverEntry &address)
Overrides connection.
Definition: ksockssocketdevice.cpp:119