Differences From Artifact [d46e5522c2]:
- File src/OFStream.h — part of check-in [d43eb177bc] at 2011-09-19 12:34:21 on branch trunk — BOOL naming conventions. (user: js, size: 25079) [annotate] [blame] [check-ins using]
To Artifact [3697389637]:
- File
src/OFStream.h
— part of check-in
[535c2d5d9b]
at
2011-09-19 16:22:23
on branch trunk
— Make using -[tryReadLine] + OFStreamObserver safe.
This makes it impossible for the developer to accidentally create a DoS.
When data has been received after calling -[tryReadLine] and the string
is still incomplete, -[streamIsReadyForReading:] will not be called
anymore until new data has been received, thus preventing spinning in a
loop. (user: js, size: 25173) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 | @interface OFStream: OFObject { char *cache; char *writeBuffer; size_t cacheLength, writeBufferLength; BOOL buffersWrites; BOOL blocking; } #ifdef OF_HAVE_PROPERTIES @property (assign, getter=isBlocking) BOOL blocking; #endif /** | > | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | @interface OFStream: OFObject { char *cache; char *writeBuffer; size_t cacheLength, writeBufferLength; BOOL buffersWrites; BOOL blocking; BOOL waitingForDelimiter; } #ifdef OF_HAVE_PROPERTIES @property (assign, getter=isBlocking) BOOL blocking; #endif /** |
︙ | ︙ | |||
799 800 801 802 803 804 805 806 | */ - (int)fileDescriptor; /** * \brief Closes the stream. */ - (void)close; @end | > > > > | 800 801 802 803 804 805 806 807 808 809 810 811 | */ - (int)fileDescriptor; /** * \brief Closes the stream. */ - (void)close; /// \cond internal - (BOOL)_isWaitingForDelimiter; /// \endcond @end |