kbufferedsocket.cpp
137 TQT_TQIO_LONG TDEBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from)
virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
Reads data from a socket.
Definition: kclientsocketbase.cpp:314
TQCString readLine()
Reads a line of data from the socket buffers.
Definition: kbufferedsocket.cpp:315
virtual TDESocketAddress peerAddress() const
Returns the peer socket address.
Definition: kclientsocketbase.cpp:391
virtual void stateChanging(SocketState newState)
Catch connection to clear the buffers.
Definition: kbufferedsocket.cpp:231
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36
virtual void slotWriteActivity()
This slot is connected to the write notifier's signal meaning the socket can write more data.
Definition: kclientsocketbase.cpp:432
virtual bool setSocketOptions(int opts)
Buffered sockets can only operate in non-blocking mode.
Definition: kbufferedsocket.cpp:73
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data from the socket.
Definition: kclientsocketbase.cpp:338
virtual void slotReadActivity()
This slot is connected to the read notifier's signal meaning the socket can read more data.
Definition: kclientsocketbase.cpp:426
void bytesWritten(int bytes)
This signal is emitted whenever data is written.
SocketState state() const
Returns the current state for this socket.
Definition: kclientsocketbase.cpp:72
TDEIOBufferBase * inputBuffer()
Retrieves the input buffer object.
Definition: kbufferedsocket.cpp:263
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: tdesocketbase.cpp:315
virtual void slotWriteActivity()
Slot called when there's write activity.
Definition: kbufferedsocket.cpp:377
bool emitsReadyWrite() const
Returns true if the readyWrite signal is set to be emitted.
Definition: kclientsocketbase.cpp:411
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data from the socket.
Definition: kbufferedsocket.cpp:143
virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
Writes data to the socket.
Definition: kbufferedsocket.cpp:165
bool canReadLine() const
Returns true if a line can be read with readLine.
Definition: kbufferedsocket.cpp:307
virtual void slotReadActivity()
Slot called when there's read activity.
Definition: kbufferedsocket.cpp:330
void gotError(int code)
This signal is emitted when this object finds an error.
void stateChanged(int newstate)
This signal is emitted whenever the socket state changes.
void setOutputBuffering(bool enable)
Sets the use of output buffering.
Definition: kbufferedsocket.cpp:268
void setError(int status, SocketError error)
Sets the socket's error code and the I/O Device's status.
Definition: tdesocketbase.cpp:309
bool emitsReadyRead() const
Returns true if the readyRead signal is set to be emitted.
Definition: kclientsocketbase.cpp:396
void copyError()
Convenience function to set this object's error code to match that of the socket device.
Definition: kclientsocketbase.cpp:485
void readyRead()
This signal is emitted whenever the socket is ready for reading – i.e., there is data to be read in t...
virtual void stateChanging(SocketState newState)
This function is called by setState whenever the state changes.
Definition: kclientsocketbase.cpp:461
virtual void setSocketDevice(TDESocketDevice *device)
Be sure to catch new devices.
Definition: kbufferedsocket.cpp:67
TQSocketNotifier * readNotifier() const
Returns a socket notifier for input on this socket.
Definition: tdesocketdevice.cpp:614
TDESocketDevice * socketDevice() const
Retrieves the socket implementation used on this socket.
Definition: tdesocketbase.cpp:116
void waitForConnect()
Blocks until the connection is either established, or completely failed.
Definition: kbufferedsocket.cpp:320
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Returns the number of bytes available on this socket.
Definition: kclientsocketbase.cpp:302
virtual void enableRead(bool enable)
Enables the emission of the readyRead signal.
Definition: kclientsocketbase.cpp:401
virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
Writes data to the socket.
Definition: kclientsocketbase.cpp:362
TDEIOBufferBase * outputBuffer()
Retrieves the output buffer object.
Definition: kbufferedsocket.cpp:282
virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
Reads data from the socket.
Definition: kbufferedsocket.cpp:121
TQSocketNotifier * writeNotifier() const
Returns a socket notifier for output on this socket.
Definition: tdesocketdevice.cpp:632
void setInputBuffering(bool enable)
Sets the use of input buffering.
Definition: kbufferedsocket.cpp:249
virtual int socketOptions() const
Retrieves the socket options that have been set.
Definition: tdesocketbase.cpp:71
virtual bool setBlocking(bool enable)
Sets this socket's blocking mode.
Definition: tdesocketbase.cpp:76
virtual void enableWrite(bool enable)
Enables the emission of the readyWrite signal.
Definition: kclientsocketbase.cpp:416
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
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Make use of the buffers.
Definition: kbufferedsocket.cpp:109
virtual void setSocketDevice(TDESocketDevice *device)
Sets the socket implementation to be used on this socket.
Definition: tdesocketbase.cpp:136