kextsock.cpp
96 switch (flags & (KExtendedSocket::streamSocket | KExtendedSocket::datagramSocket | KExtendedSocket::rawSocket))
1221 TQObject::connect(this, TQ_SIGNAL(lookupFinished(int)), this, TQ_SLOT(startAsyncConnectSlot()));
1972 TQObject::disconnect(this, TQ_SIGNAL(lookupFinished(int)), this, TQ_SLOT(startAsyncConnectSlot()));
Definition: kextsock.h:1023
virtual void consumeWriteBuffer(unsigned nbytes)
Consumes data from the output buffer.
Definition: kbufferedio.cpp:214
virtual void enableRead(bool enable)
Toggles the emission of the readyRead signal.
Definition: kextsock.cpp:1613
void lookupFinished(int count)
This signal is emitted whenever an asynchronous lookup process is done.
virtual void release()
Releases the socket and anything we have holding on it.
Definition: kextsock.cpp:1334
virtual int getch()
Gets a single character (unsigned char) from the stream.
Definition: kextsock.cpp:1595
virtual bool setBufferSize(int rsize, int wsize=-2)
Sets the buffer sizes for this socket.
Definition: kextsock.cpp:616
virtual int unreadBlock(const char *data, uint len)
Reimplementation of unreadBlock() method.
Definition: kextsock.cpp:1548
int family() const KDE_DEPRECATED
Returns the family of the address info (see getaddrinfo(3)).
Definition: kextsock.cpp:2218
int getsockname(int s, sockaddr *name, ksocklen_t *namelen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:536
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36
TQString bindHost() const
Returns the hostname to which the socket will be/is bound.
Definition: kextsock.cpp:361
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 unsigned readBufferSize() const
Returns the number of bytes in the read buffer.
Definition: kbufferedio.cpp:270
int getpeername(int s, sockaddr *name, ksocklen_t *namelen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:548
bool addressReusable()
Returns whether this socket's address can be reused.
Definition: kextsock.cpp:531
TQPtrList< TQByteArray > outBuf
For an explanation on how this buffer work, please refer to the comments at the top of kbufferedio....
Definition: kbufferedio.h:219
virtual int putch(int ch)
Writes a single character (unsigned char) to the stream.
Definition: kextsock.cpp:1606
virtual int bytesAvailable() const
Returns the number of available bytes yet to be read via readBlock and family of functions.
Definition: kextsock.cpp:1555
bool setBindAddress(const TQString &host, int port)
Sets both host and port to which we will bind the socket.
Definition: kextsock.cpp:403
virtual void enableWrite(bool enable)
Toggles the emission of the readyWrite signal.
Definition: kextsock.cpp:1628
const ::TDESocketAddress * peerAddress()
Returns the peer socket address.
Definition: kextsock.cpp:731
virtual int startAsyncLookup()
Starts an asynchronous lookup for the addresses given.
Definition: kextsock.cpp:766
const char * canonname() const KDE_DEPRECATED
Returns the official name of the host (see getaddrinfo(3)).
Definition: kextsock.cpp:2233
virtual int lookup()
Performs lookup on the addresses we were given before.
Definition: kextsock.cpp:744
bool setIPv6Only(bool enable)
Sets/unsets the v6-only flag for IPv6 sockets.
Definition: kextsock.cpp:554
static TQString strError(int code, int syserr)
Returns the representing text of this error code.
Definition: kextsock.cpp:2156
virtual unsigned feedWriteBuffer(unsigned nbytes, const char *buffer)
Feeds data into the output buffer.
Definition: kbufferedio.cpp:259
virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len)
Writes a block of data to the socket.
Definition: kextsock.cpp:1479
signed long int write(int fd, const void *buf, unsigned long int count)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:494
bool setAddress(const TQString &host, int port)
Sets the address where we will connect to.
Definition: kextsock.cpp:322
bool setBindHost(const TQString &host)
Sets the hostname to which we will bind locally before connecting.
Definition: kextsock.cpp:340
int recv(int s, void *buf, unsigned long int len, int flags)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:522
bool setTimeout(int secs, int usecs=0)
Sets the timeout value for the connection (if this is not passiveSocket) or acception (if it is).
Definition: kextsock.cpp:427
bool setAddressReusable(bool enable)
Sets/unsets address reusing flag for this socket.
Definition: kextsock.cpp:498
int listen(int s, int backlog)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:580
bool setBindPort(int port)
Sets the port/service to which we will bind before connecting.
Definition: kextsock.cpp:370
void connectionFailed(int error)
This signal is emitted whenever our asynchronous connection attempt failed to all hosts listed.
void reset()
Resets the socket, disconnecting if still connected and freeing any related resources still being kep...
Definition: kextsock.cpp:225
int systemError() const
Returns the related system error code Except for IO_LookupError errors, these are codes found in errn...
Definition: kextsock.cpp:250
void bytesWritten(int nbytes)
This signal gets sent whenever bytes are written from the buffer.
const ::TDESocketAddress * localAddress()
Returns the local socket address.
Definition: kextsock.cpp:716
int error() const
Retrieves the error code associated with this resolution.
Definition: kresolver.cpp:247
int protocol() const KDE_DEPRECATED
Returns the protocol of the address info (see getaddrinfo(3)).
Definition: kextsock.cpp:2228
virtual int bytesAvailable() const
Returns the number of bytes available for reading in the read buffer.
Definition: kbufferedio.cpp:114
static TDESocketAddress * newAddress(const struct sockaddr *sa, ksocklen_t size)
Creates a new TDESocketAddress or descendant class from given raw socket address.
Definition: ksockaddr.cpp:123
virtual void cancelAsyncConnect()
Cancels any on-going asynchronous connection attempt.
Definition: kextsock.cpp:1240
virtual int accept(KExtendedSocket *&sock)
Accepts an incoming connection from the socket.
Definition: kextsock.cpp:904
virtual unsigned writeBufferSize() const
Returns the number of bytes in the write buffer.
Definition: kbufferedio.cpp:283
virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen)
Reads a block of data from the socket.
Definition: kextsock.cpp:1434
virtual ~KExtendedSocket()
Destroys the socket, disconnecting if still connected and freeing any related resources still being k...
Definition: kextsock.cpp:208
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
void connectionSuccess()
This signal is emitted whenever we connected asynchronously to a host.
bool isIPv6Only()
Returns the status of the v6-only flag for IPv6 sockets.
Definition: kextsock.cpp:586
virtual void closeNow()
Closes the socket now, discarding the contents of the write buffer, if any.
Definition: kextsock.cpp:1307
virtual unsigned consumeReadBuffer(unsigned nbytes, char *destbuffer, bool discard=true)
Consumes data from the input buffer.
Definition: kbufferedio.cpp:164
virtual int waitForMore(int msec)
Waits msec milliseconds for more data to be available (use 0 to wait forever).
Definition: kextsock.cpp:1568
signed long int read(int fd, void *buf, unsigned long int count)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:487
int flags() const KDE_DEPRECATED
Returns the flags of the address info (see getaddrinfo(3)).
Definition: kextsock.cpp:2213
static int resolve(sockaddr *sock, ksocklen_t len, TQString &host, TQString &port, int flags=0) KDE_DEPRECATED
Performs resolution on the given socket address.
Definition: kextsock.cpp:1978
TQString bindPort() const
Returns the service to which the socket will be/is bound.
Definition: kextsock.cpp:395
bool setBlockingMode(bool enable)
Sets/unsets blocking mode for the socket.
Definition: kextsock.cpp:448
virtual bool open(int mode=(int)(IO_Raw|IO_ReadWrite))
Implementation of TQIODevice::open() pure virtual function.
Definition: kextsock.cpp:1260
int socktype() const KDE_DEPRECATED
Returns the socket type of the address info (see getaddrinfo(3)).
Definition: kextsock.cpp:2223
void readyAccept()
This signal is emitted whenever this socket is ready to accept another socket.
virtual void cancelAsyncLookup()
Cancels any on-going asynchronous lookups.
Definition: kextsock.cpp:825
virtual unsigned feedReadBuffer(unsigned nbytes, const char *buffer, bool atBeginning=false)
Feeds data into the input buffer.
Definition: kbufferedio.cpp:243
virtual int peekBlock(char *data, uint maxlen)
Peeks at a block of data from the socket.
Definition: kextsock.cpp:1533