kbufferedio.h
This abstract class implements basic functionality for buffered input/output.
Definition kbufferedio.h:57
virtual int bytesToWrite() const
Returns the number of bytes yet to write, still in the write buffer.
Definition kbufferedio.cpp:119
virtual int waitForMore(int msec)=0
Waits for more data to be available and returns the amount of available data then.
virtual void closeNow()=0
Closes the stream now, discarding the contents of the write buffer.
virtual unsigned feedWriteBuffer(unsigned nbytes, const char *buffer)
Feeds data into the output buffer.
Definition kbufferedio.cpp:259
virtual bool canReadLine() const
Checks whether there is enough data in the buffer to read a line.
Definition kbufferedio.cpp:125
virtual unsigned consumeReadBuffer(unsigned nbytes, char *destbuffer, bool discard=true)
Consumes data from the input buffer.
Definition kbufferedio.cpp:164
virtual unsigned readBufferSize() const
Returns the number of bytes in the read buffer.
Definition kbufferedio.cpp:270
virtual bool setBufferSize(int rsize, int wsize=-2)
Sets the internal buffer size to value.
Definition kbufferedio.cpp:104
virtual unsigned feedReadBuffer(unsigned nbytes, const char *buffer, bool atBeginning=false)
Feeds data into the input buffer.
Definition kbufferedio.cpp:243
virtual int peekBlock(char *data, uint maxlen)=0
Reads into the user buffer at most maxlen bytes, but does not consume that data from the read buffer.
void bytesWritten(int nbytes)
This signal gets sent whenever bytes are written from the buffer.
TQPtrList< TQByteArray > inBuf
For an explanation on how this buffer work, please refer to the comments at the top of kbufferedio....
Definition kbufferedio.h:213
TQPtrList< TQByteArray > outBuf
For an explanation on how this buffer work, please refer to the comments at the top of kbufferedio....
Definition kbufferedio.h:219
virtual int bytesAvailable() const
Returns the number of bytes available for reading in the read buffer.
Definition kbufferedio.cpp:114
virtual void consumeWriteBuffer(unsigned nbytes)
Consumes data from the output buffer.
Definition kbufferedio.cpp:214
virtual unsigned writeBufferSize() const
Returns the number of bytes in the write buffer.
Definition kbufferedio.cpp:283
Trinity API Reference