KDELibs4Support
k3socketdevice.cpp
445 static int do_read_common(int sockfd, char *data, qint64 maxlen, KSocketAddress *from, ssize_t &retval, bool peek = false)
bool bind(const KResolverEntry &address) override
Binds this socket to the given address.
Definition: k3socketdevice.cpp:281
bool contains(const Key &key) const const
KSocketAddress externalAddress() const override
Returns this socket's externally visible local address.
Definition: k3socketdevice.cpp:637
KSocketAddress peerAddress() const override
Returns this socket's peer address.
Definition: k3socketdevice.cpp:596
virtual QString toString() const
Returns this socket address as a string suitable for printing.
Definition: k3socketaddress.cpp:611
KSocketAddress & setLength(quint16 len)
Sets the length of this socket structure.
Definition: k3socketaddress.cpp:479
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: k3socketbase.cpp:442
QSocketNotifier * writeNotifier() const
Returns a socket notifier for output on this socket.
Definition: k3socketdevice.cpp:663
QMap::const_iterator constBegin() const const
Definition: netaccess.h:36
qint64 waitForMore(int msecs, bool *timeout=nullptr) override
Waits up to msecs for more data to be available on this socket.
Definition: k3socketdevice.cpp:431
virtual bool connect(const KResolverEntry &address, OpenMode mode=ReadWrite) override
Connect to a remote host.
Definition: k3socketdevice.cpp:328
virtual int capabilities() const
Returns the set of capabilities this socket class implements.
Definition: k3socketdevice.cpp:129
typedef OpenMode
const sockaddr * address() const
Returns the socket address structure, to be passed down to low level functions.
Definition: k3socketaddress.cpp:444
qint64 peek(char *data, qint64 maxlen)
Peeks the data in the socket and the source address.
Definition: k3socketbase.cpp:395
QSocketNotifier * exceptionNotifier() const
Returns a socket notifier for exceptional events on this socket.
Definition: k3socketdevice.cpp:682
virtual QSocketNotifier * createNotifier(QSocketNotifier::Type type) const
Creates a socket notifier of the given type.
Definition: k3socketdevice.cpp:826
qint64 readData(char *data, qint64 maxlen, KSocketAddress *from=nullptr) override
Reads data and the source address from this socket.
Definition: k3socketdevice.cpp:477
int protocol() const
Retrieves the protocol associated with this entry.
Definition: k3resolver.cpp:168
virtual KSocketAddress & setFamily(int family)
Sets the family of this object.
Definition: k3socketaddress.cpp:494
qint64 peekData(char *data, qint64 maxlen, KSocketAddress *from=nullptr) override
Peeks the data in the socket and the source address.
Definition: k3socketdevice.cpp:499
A namespace to store all networking-related (socket) classes.
Definition: k3bufferedsocket.h:35
QSocketNotifier * readNotifier() const
Returns a socket notifier for input on this socket.
Definition: k3socketdevice.cpp:644
bool listen(int backlog=5) override
Puts this socket into listening mode.
Definition: k3socketdevice.cpp:309
static void addNewImpl(KSocketDeviceFactoryBase *factory, int capabilities)
Adds a factory of KSocketDevice objects to the list, along with its capabilities flag.
Definition: k3socketdevice.cpp:932
KSocketAddress localAddress() const override
Returns this socket's local address.
Definition: k3socketdevice.cpp:555
virtual bool create(int family, int type, int protocol)
Creates a socket but don't connect or bind anywhere.
Definition: k3socketdevice.cpp:251
void setSocketDevice(KSocketDevice *device) override
Definition: k3socketbase.cpp:348
QMap::const_iterator constEnd() const const
const char * constData() const const
bool setSocketOptions(int opts) override
This implementation sets the options on the socket.
Definition: k3socketdevice.cpp:134
virtual bool setSocketOptions(int opts)
Set the given socket options.
Definition: k3socketbase.cpp:84
qint64 write(const char *data, qint64 len)
Writes the given data to the socket.
Definition: k3socketbase.cpp:405
KSocketAddress address() const
Retrieves the socket address associated with this entry.
Definition: k3resolver.cpp:132
static KSocketDeviceFactoryBase * setDefaultImpl(KSocketDeviceFactoryBase *factory)
Sets the default KSocketDevice implementation to use and return the old factory.
Definition: k3socketdevice.cpp:924
quint16 length() const
Retrieves the length of the socket address structure.
Definition: k3resolver.cpp:138
QByteArray toLatin1() const const
int socketType() const
Retrieves the socket type associated with this entry.
Definition: k3resolver.cpp:162
KSocketDevice * accept() override
Accepts a new incoming connection.
Definition: k3socketdevice.cpp:362
quint16 length() const
Returns the length of this socket address structure.
Definition: k3socketaddress.cpp:471
virtual qint64 writeData(const char *data, qint64 len, const KSocketAddress *to=nullptr) override
Writes the given data to the given destination address.
Definition: k3socketdevice.cpp:521
int family() const
Retrieves the family associated with this socket address.
Definition: k3resolver.cpp:144
QMap::iterator insert(const Key &key, const T &value)
virtual int socketOptions() const
Retrieves the socket options that have been set.
Definition: k3socketbase.cpp:90
typedef ConstIterator
void setOpenMode(QIODevice::OpenMode openMode)
QObject * parent() const const
KSocketDevice(const KSocketBase *=nullptr, QObject *objparent=nullptr)
Default constructor.
Definition: k3socketdevice.cpp:81
static KSocketDevice * createDefault(KSocketBase *parent)
Creates a new default KSocketDevice object given the parent object.
Definition: k3socketdevice.cpp:889
virtual bool poll(bool *input, bool *output, bool *exception=nullptr, int timeout=-1, bool *timedout=nullptr)
Executes a poll in the socket, via select(2) or poll(2).
Definition: k3socketdevice.cpp:701
qint64 bytesAvailable() const override
Returns the number of bytes available for reading without blocking.
Definition: k3socketdevice.cpp:417
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 23:00:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 23:00:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.