KDELibs4Support
62 #include <kdelibs4support_export.h> 63 #include "k3socketaddress.h" 73 class KSocketBasePrivate;
111 AddressReuseable = 0x02,
194 virtual bool setSocketOptions(
int opts);
205 virtual int socketOptions()
const;
223 virtual bool setBlocking(
bool enable);
231 bool blocking()
const;
247 virtual bool setAddressReuseable(
bool enable);
255 bool addressReuseable()
const;
272 virtual bool setIPv6Only(
bool enable);
280 bool isIPv6Only()
const;
293 virtual bool setBroadcast(
bool enable);
301 bool broadcast()
const;
316 virtual bool setNoDelay(
bool enable);
323 bool noDelay()
const;
369 int setRequestedCapabilities(
int add,
int remove = 0);
376 bool hasDevice()
const;
435 static bool isFatalError(
int code);
440 void unsetSocketDevice();
445 KSocketBasePrivate *
const d;
487 bool open(OpenMode mode)
override;
520 OpenMode mode = ReadWrite) = 0;
537 virtual bool disconnect() = 0;
542 bool isSequential()
const override;
548 qint64 size()
const override;
554 qint64 pos()
const override;
560 bool seek(qint64)
override;
566 bool atEnd()
const override;
574 qint64 read(
char *data, qint64 maxlen);
608 qint64 peek(
char *data, qint64 maxlen);
631 qint64 write(
const char *data, qint64 len);
652 qint64 write(
const char *data, qint64 len,
const KSocketAddress &to);
665 virtual qint64 waitForMore(
int msecs,
bool *timeout =
nullptr) = 0;
670 void ungetChar(
char);
700 qint64 readData(
char *data, qint64 len)
override;
713 virtual qint64 readData(
char *data, qint64 maxlen,
KSocketAddress *from) = 0;
727 virtual qint64 peekData(
char *data, qint64 maxlen,
KSocketAddress *from) = 0;
735 qint64 writeData(
const char *data, qint64 len)
override;
748 virtual qint64 writeData(
const char *data, qint64 len,
const KSocketAddress *to) = 0;
812 virtual bool listen(
int backlog) = 0;
818 virtual void close() = 0;
Abstract class for active sockets.
A generic socket address.
A namespace to store all networking-related (socket) classes.
SocketError
Possible socket error codes.
SocketOptions
Possible socket options.
int open(const QString &pathname, int flags, mode_t mode=0)
replacement for open()/::open64() to handle filenames in a platform independent way ...
Low-level socket functionality.
Abstract base class for passive sockets.
Basic socket functionality.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Mar 8 2021 22:58:07 by
doxygen 1.8.11 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.