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