KDECore
k3bufferedsocket.cpp
Go to the documentation of this file.
KSocketDevice * socketDevice() const
Retrieves the socket implementation used on this socket.
Definition: k3socketbase.cpp:148
SocketState state() const
Returns the current state for this socket.
Definition: k3clientsocketbase.cpp:66
virtual void close()
Closes the socket for new data, but allow data that had been buffered for output with writeData() to ...
Definition: k3bufferedsocket.cpp:85
virtual void slotReadActivity()
Slot called when there's read activity.
Definition: k3bufferedsocket.cpp:296
virtual qint64 waitForMore(int msecs, bool *timeout=0L)
Make use of buffers.
Definition: k3bufferedsocket.cpp:107
virtual void setSocketDevice(KSocketDevice *device)
Be sure to catch new devices.
Definition: k3bufferedsocket.cpp:69
virtual qint64 readData(char *data, qint64 maxlen, KSocketAddress *from)
Reads data from a socket.
Definition: k3bufferedsocket.cpp:119
virtual bool setSocketOptions(int opts)
Buffered sockets can only operate in non-blocking mode.
Definition: k3bufferedsocket.cpp:76
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: k3socketbase.cpp:441
QSocketNotifier * writeNotifier() const
Returns a socket notifier for output on this socket.
Definition: k3socketdevice.cpp:665
virtual bool canReadLine() const
Returns true if a line can be read with readLine()
Definition: k3bufferedsocket.cpp:273
virtual void slotReadActivity()
This slot is connected to the read notifier's signal meaning the socket can read more data...
Definition: k3clientsocketbase.cpp:394
virtual qint64 bytesToWrite() const
Returns the length of the output buffer.
Definition: k3bufferedsocket.cpp:258
void gotError(int code)
This signal is emitted when this object finds an error.
virtual bool setSocketOptions(int opts)
Sets the socket options.
Definition: k3clientsocketbase.cpp:77
virtual qint64 writeData(const char *data, qint64 len, const KSocketAddress *to)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: k3clientsocketbase.cpp:340
QSocketNotifier * readNotifier() const
Returns a socket notifier for input on this socket.
Definition: k3socketdevice.cpp:647
virtual void closeNow()
Closes the socket and discards any output data that had been buffered with writeData() but that had n...
Definition: k3bufferedsocket.cpp:266
virtual qint64 readData(char *data, qint64 maxlen, KSocketAddress *from)
Reads data from a socket.
Definition: k3clientsocketbase.cpp:316
void copyError()
Convenience function to set this object's error code to match that of the socket device.
Definition: k3clientsocketbase.cpp:453
virtual KSocketAddress peerAddress() const
Returns the peer socket address.
Definition: k3clientsocketbase.cpp:359
void waitForConnect()
Blocks until the connection is either established, or completely failed.
Definition: k3bufferedsocket.cpp:286
virtual qint64 peekData(char *data, qint64 maxlen, KSocketAddress *from)
Peeks data from the socket.
Definition: k3bufferedsocket.cpp:135
virtual void slotWriteActivity()
Slot called when there's write activity.
Definition: k3bufferedsocket.cpp:343
void setState(SocketState state)
Sets the socket state to state.
Definition: k3clientsocketbase.cpp:71
KBufferedSocket(const QString &node=QString(), const QString &service=QString(), QObject *parent=0L)
Default constructor.
Definition: k3bufferedsocket.cpp:52
void stateChanged(int newstate)
This signal is emitted whenever the socket state changes.
virtual qint64 bytesAvailable() const
Returns the number of bytes available on this socket.
Definition: k3clientsocketbase.cpp:296
virtual qint64 peekData(char *data, qint64 maxlen, KSocketAddress *from)
Peeks data from the socket.
Definition: k3clientsocketbase.cpp:328
virtual void setSocketDevice(KSocketDevice *device)
Definition: k3socketbase.cpp:347
void setOutputBuffering(bool enable)
Sets the use of output buffering.
Definition: k3bufferedsocket.cpp:244
virtual void enableRead(bool enable)
Enables the emission of the readyRead signal.
Definition: k3clientsocketbase.cpp:369
void output(QList< Action > actions, QHash< QString, QString > domain)
Definition: fake/kauth-policy-gen-polkit.cpp:41
virtual void stateChanging(SocketState newState)
This function is called by setState() whenever the state changes.
Definition: k3clientsocketbase.cpp:429
void setInputBuffering(bool enable)
Sets the use of input buffering.
Definition: k3bufferedsocket.cpp:230
bool emitsReadyRead() const
Returns true if the readyRead signal is set to be emitted.
Definition: k3clientsocketbase.cpp:364
virtual bool setBlocking(bool enable)
Sets this socket's blocking mode.
Definition: k3socketbase.cpp:97
virtual qint64 waitForMore(int msecs, bool *timeout=0L)
Waits for more data.
Definition: k3clientsocketbase.cpp:304
virtual void stateChanging(SocketState newState)
Catch connection to clear the buffers.
Definition: k3bufferedsocket.cpp:212
bool emitsReadyWrite() const
Returns true if the readyWrite signal is set to be emitted.
Definition: k3clientsocketbase.cpp:379
virtual int socketOptions() const
Retrieves the socket options that have been set.
Definition: k3socketbase.cpp:92
virtual void enableWrite(bool enable)
Enables the emission of the readyWrite signal.
Definition: k3clientsocketbase.cpp:384
virtual qint64 readLineData(char *data, qint64 maxSize)
Improve the readLine performance.
Definition: k3bufferedsocket.cpp:281
virtual void slotWriteActivity()
This slot is connected to the write notifier's signal meaning the socket can write more data...
Definition: k3clientsocketbase.cpp:400
virtual qint64 writeData(const char *data, qint64 len, const KSocketAddress *to)
Writes data to the socket.
Definition: k3bufferedsocket.cpp:151
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.