kextsock.cpp
96 switch (flags & (KExtendedSocket::streamSocket | KExtendedSocket::datagramSocket | KExtendedSocket::rawSocket))
695 TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
710 TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
1226 TQObject::connect(this, TQT_SIGNAL(lookupFinished(int)), this, TQT_SLOT(startAsyncConnectSlot()));
1924 TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
1982 TQObject::disconnect(this, TQT_SIGNAL(lookupFinished(int)), this, TQT_SLOT(startAsyncConnectSlot()));
Definition: kextsock.h:1043
virtual void consumeWriteBuffer(unsigned nbytes)
Consumes data from the output buffer.
Definition: kbufferedio.cpp:224
virtual void enableRead(bool enable)
Toggles the emission of the readyRead signal.
Definition: kextsock.cpp:1623
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:1339
virtual int getch()
Gets a single character (unsigned char) from the stream.
Definition: kextsock.cpp:1605
virtual bool setBufferSize(int rsize, int wsize=-2)
Sets the buffer sizes for this socket.
Definition: kextsock.cpp:621
virtual int unreadBlock(const char *data, uint len)
Reimplementation of unreadBlock() method.
Definition: kextsock.cpp:1553
int family() const KDE_DEPRECATED
Returns the family of the address info (see getaddrinfo(3)).
Definition: kextsock.cpp:2228
int socketStatus() const
Resets the socket, disconnecting if still connected and freeing any related resources still being kep...
Definition: kextsock.cpp:239
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:366
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:280
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:536
TQPtrList< TQByteArray > outBuf
For an explanation on how this buffer work, please refer to the comments at the top of kbufferedio....
Definition: kbufferedio.h:229
virtual int putch(int ch)
Writes a single character (unsigned char) to the stream.
Definition: kextsock.cpp:1616
bool setBindAddress(const TQString &host, int port)
Sets both host and port to which we will bind the socket.
Definition: kextsock.cpp:408
virtual void enableWrite(bool enable)
Toggles the emission of the readyWrite signal.
Definition: kextsock.cpp:1638
const ::TDESocketAddress * peerAddress()
Returns the peer socket address.
Definition: kextsock.cpp:736
virtual int startAsyncLookup()
Starts an asynchronous lookup for the addresses given.
Definition: kextsock.cpp:771
const char * canonname() const KDE_DEPRECATED
Returns the official name of the host (see getaddrinfo(3)).
Definition: kextsock.cpp:2243
virtual int lookup()
Performs lookup on the addresses we were given before.
Definition: kextsock.cpp:749
bool setIPv6Only(bool enable)
Sets/unsets the v6-only flag for IPv6 sockets.
Definition: kextsock.cpp:559
static TQString strError(int code, int syserr)
Returns the representing text of this error code.
Definition: kextsock.cpp:2166
virtual unsigned feedWriteBuffer(unsigned nbytes, const char *buffer)
Feeds data into the output buffer.
Definition: kbufferedio.cpp:269
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:327
bool setBindHost(const TQString &host)
Sets the hostname to which we will bind locally before connecting.
Definition: kextsock.cpp:345
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:432
bool setAddressReusable(bool enable)
Sets/unsets address reusing flag for this socket.
Definition: kextsock.cpp:503
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:375
void connectionFailed(int error)
This signal is emitted whenever our asynchronous connection attempt failed to all hosts listed.
int systemError() const
Returns the related system error code Except for IO_LookupError errors, these are codes found in errn...
Definition: kextsock.cpp:255
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:721
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:2238
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:1245
virtual int accept(KExtendedSocket *&sock)
Accepts an incoming connection from the socket.
Definition: kextsock.cpp:909
virtual unsigned writeBufferSize() const
Returns the number of bytes in the write buffer.
Definition: kbufferedio.cpp:293
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.
virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
Writes a block of data to the socket.
Definition: kextsock.cpp:1484
bool isIPv6Only()
Returns the status of the v6-only flag for IPv6 sockets.
Definition: kextsock.cpp:591
virtual void closeNow()
Closes the socket now, discarding the contents of the write buffer, if any.
Definition: kextsock.cpp:1312
virtual unsigned consumeReadBuffer(unsigned nbytes, char *destbuffer, bool discard=true)
Consumes data from the input buffer.
Definition: kbufferedio.cpp:174
virtual int waitForMore(int msec)
Returns the number of available bytes yet to be read via readBlock and family of functions.
Definition: kextsock.cpp:1578
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:2223
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:1988
virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
Reads a block of data from the socket.
Definition: kextsock.cpp:1439
TQString bindPort() const
Returns the service to which the socket will be/is bound.
Definition: kextsock.cpp:400
bool setBlockingMode(bool enable)
Sets/unsets blocking mode for the socket.
Definition: kextsock.cpp:453
int socktype() const KDE_DEPRECATED
Returns the socket type of the address info (see getaddrinfo(3)).
Definition: kextsock.cpp:2233
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:830
virtual unsigned feedReadBuffer(unsigned nbytes, const char *buffer, bool atBeginning=false)
Feeds data into the input buffer.
Definition: kbufferedio.cpp:253
virtual bool open(TQ_OpenMode mode=(TQ_OpenMode)(IO_Raw|IO_ReadWrite))
Implementation of TQIODevice::open() pure virtual function.
Definition: kextsock.cpp:1265
virtual int peekBlock(char *data, uint maxlen)
Peeks at a block of data from the socket.
Definition: kextsock.cpp:1538