kbufferedsocket.cpp
void setError(int status, SocketError error)
Sets the socket's error code and the I/O Device's status.
Definition: tdesocketbase.cpp:309
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: tdesocketbase.cpp:315
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Waits for more data.
Definition: kclientsocketbase.cpp:289
bool emitsReadyWrite() const
Returns true if the readyWrite signal is set to be emitted.
Definition: kclientsocketbase.cpp:398
virtual void stateChanging(SocketState newState)
This function is called by setState whenever the state changes.
Definition: kclientsocketbase.cpp:448
virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len)
Writes data to the socket.
Definition: kclientsocketbase.cpp:349
virtual TQ_LONG bytesAvailable() const
Returns the number of bytes available on this socket.
Definition: kclientsocketbase.cpp:281
virtual void enableRead(bool enable)
Enables the emission of the readyRead signal.
Definition: kclientsocketbase.cpp:388
virtual void slotReadActivity()
This slot is connected to the read notifier's signal meaning the socket can read more data.
Definition: kclientsocketbase.cpp:413
virtual void enableWrite(bool enable)
Enables the emission of the readyWrite signal.
Definition: kclientsocketbase.cpp:403
void readyRead()
This signal is emitted whenever the socket is ready for reading – i.e., there is data to be read in t...
virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen)
Reads data from a socket.
Definition: kclientsocketbase.cpp:301
bool emitsReadyRead() const
Returns true if the readyRead signal is set to be emitted.
Definition: kclientsocketbase.cpp:383
SocketState state() const
Returns the current state for this socket.
Definition: kclientsocketbase.cpp:64
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data from the socket.
Definition: kclientsocketbase.cpp:325
void gotError(int code)
This signal is emitted when this object finds an error.
void copyError()
Convenience function to set this object's error code to match that of the socket device.
Definition: kclientsocketbase.cpp:472
virtual void slotWriteActivity()
This slot is connected to the write notifier's signal meaning the socket can write more data.
Definition: kclientsocketbase.cpp:419
virtual TDESocketAddress peerAddress() const
Returns the peer socket address.
Definition: kclientsocketbase.cpp:378
void stateChanged(int newstate)
This signal is emitted whenever the socket state changes.
virtual void stateChanging(SocketState newState)
Catch connection to clear the buffers.
Definition: kbufferedsocket.cpp:226
virtual bool setSocketOptions(int opts)
Buffered sockets can only operate in non-blocking mode.
Definition: kbufferedsocket.cpp:73
virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len)
Writes data to the socket.
Definition: kbufferedsocket.cpp:160
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data from the socket.
Definition: kbufferedsocket.cpp:138
TDEIOBufferBase * outputBuffer()
Retrieves the output buffer object.
Definition: kbufferedsocket.cpp:277
void waitForConnect()
Blocks until the connection is either established, or completely failed.
Definition: kbufferedsocket.cpp:310
virtual TQ_ULONG bytesToWrite() const
Returns the length of the output buffer.
Definition: kbufferedsocket.cpp:282
TQCString readLine()
Reads a line of data from the socket buffers.
Definition: kbufferedsocket.cpp:305
virtual void slotWriteActivity()
Slot called when there's write activity.
Definition: kbufferedsocket.cpp:367
virtual void setSocketDevice(TDESocketDevice *device)
Be sure to catch new devices.
Definition: kbufferedsocket.cpp:67
virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen)
Reads data from the socket.
Definition: kbufferedsocket.cpp:116
virtual void close()
Closes the socket for new data, but allow data that had been buffered for output with writeBlock to b...
Definition: kbufferedsocket.cpp:82
TDEIOBufferBase * inputBuffer()
Retrieves the input buffer object.
Definition: kbufferedsocket.cpp:258
virtual void slotReadActivity()
Slot called when there's read activity.
Definition: kbufferedsocket.cpp:320
void bytesWritten(int bytes)
This signal is emitted whenever data is written.
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Make use of buffers.
Definition: kbufferedsocket.cpp:104
bool canReadLine() const
Returns true if a line can be read with readLine.
Definition: kbufferedsocket.cpp:297
virtual void closeNow()
Closes the socket and discards any output data that had been buffered with writeBlock but that had no...
Definition: kbufferedsocket.cpp:290
void setOutputBuffering(bool enable)
Sets the use of output buffering.
Definition: kbufferedsocket.cpp:263
void setInputBuffering(bool enable)
Sets the use of input buffering.
Definition: kbufferedsocket.cpp:244
virtual void setSocketDevice(TDESocketDevice *device)
Sets the socket implementation to be used on this socket.
Definition: tdesocketbase.cpp:136
virtual bool setBlocking(bool enable)
Sets this socket's blocking mode.
Definition: tdesocketbase.cpp:76
TDESocketDevice * socketDevice() const
Retrieves the socket implementation used on this socket.
Definition: tdesocketbase.cpp:116
virtual int socketOptions() const
Retrieves the socket options that have been set.
Definition: tdesocketbase.cpp:71
TQSocketNotifier * writeNotifier() const
Returns a socket notifier for output on this socket.
Definition: tdesocketdevice.cpp:627
TQSocketNotifier * readNotifier() const
Returns a socket notifier for input on this socket.
Definition: tdesocketdevice.cpp:609
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36