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