Differences From Artifact [dd21d0d02a]:
- File
src/OFStream.h
— part of check-in
[b554732eae]
at
2010-09-19 02:52:19
on branch trunk
— Improve OFStreamObserver.
It also looks at the cache of each stream now and does not block if
there is still data in the cache. (user: js, size: 8577) [annotate] [blame] [check-ins using]
To Artifact [0915ec3638]:
- File
src/OFStream.h
— part of check-in
[c3c2bcca46]
at
2010-09-20 11:26:00
on branch trunk
— Better API for the writte buffer of streams.
Can now be disabled without flushing and then be flushed later. (user: js, size: 8738) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
28 29 30 31 32 33 34 | @interface OFStream: OFObject { @public char *cache; @protected char *wBuffer; size_t cacheLen, wBufferLen; | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | @interface OFStream: OFObject { @public char *cache; @protected char *wBuffer; size_t cacheLen, wBufferLen; BOOL bufferWrites;; } /** * Returns a boolean whether the end of the stream has been reached. * * \return A boolean whether the end of the stream has been reached */ |
︙ | ︙ | |||
194 195 196 197 198 199 200 | * \return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)readTillDelimiter: (OFString*)delimiter withEncoding: (enum of_string_encoding)encoding; /** | | | > > > > > | > > | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | * \return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)readTillDelimiter: (OFString*)delimiter withEncoding: (enum of_string_encoding)encoding; /** * \return A boolean whether writes are buffered */ - (BOOL)bufferWrites; /** * Enables or disables the write buffer. * * \param enable Whether the write buffer should be enabled or disabled */ - (void)setBufferWrites: (BOOL)enable; /** * Writes everythig in the write buffer to the stream. */ - (void)flushWriteBuffer; /** * Writes from a buffer into the stream. * * \param buf The buffer from which the data is written to the stream |
︙ | ︙ |