kbufferedsocket.cpp
137 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:614
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:72
virtual void slotWriteActivity()
Slot called when there's write activity.
Definition: kbufferedsocket.cpp:377
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:391
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:632
TQCString readLine()
Reads a line of data from the socket buffers.
Definition: kbufferedsocket.cpp:315
virtual void slotReadActivity()
This slot is connected to the read notifier's signal meaning the socket can read more data...
Definition: kclientsocketbase.cpp:426
virtual void stateChanging(SocketState newState)
Catch connection to clear the buffers.
Definition: kbufferedsocket.cpp:231
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:263
virtual bool setSocketOptions(int opts)
Sets the socket options.
Definition: kclientsocketbase.cpp:83
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data from the socket.
Definition: kclientsocketbase.cpp:338
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:330
void copyError()
Convenience function to set this object's error code to match that of the socket device.
Definition: kclientsocketbase.cpp:485
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data from the socket.
Definition: kbufferedsocket.cpp:143
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
virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
Writes data to the socket.
Definition: kbufferedsocket.cpp:165
TDEIOBufferBase * outputBuffer()
Retrieves the output buffer object.
Definition: kbufferedsocket.cpp:282
void setState(SocketState state)
Sets the socket state to state.
Definition: kclientsocketbase.cpp:77
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:320
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:362
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:401
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:121
bool canReadLine() const
Returns true if a line can be read with readLine.
Definition: kbufferedsocket.cpp:307
virtual void stateChanging(SocketState newState)
This function is called by setState whenever the state changes.
Definition: kclientsocketbase.cpp:461
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Returns the number of bytes available on this socket.
Definition: kclientsocketbase.cpp:302
bool emitsReadyRead() const
Returns true if the readyRead signal is set to be emitted.
Definition: kclientsocketbase.cpp:396
void setInputBuffering(bool enable)
Sets the use of input buffering.
Definition: kbufferedsocket.cpp:249
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Make use of the buffers.
Definition: kbufferedsocket.cpp:109
bool emitsReadyWrite() const
Returns true if the readyWrite signal is set to be emitted.
Definition: kclientsocketbase.cpp:411
virtual void enableWrite(bool enable)
Enables the emission of the readyWrite signal.
Definition: kclientsocketbase.cpp:416
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 TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
Reads data from a socket.
Definition: kclientsocketbase.cpp:314