ObjFW  Diff

Differences From 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]

To Artifact [d01ccdc23f]:


802
803
804
805
806
807
808




809
810
811

/**
 * \brief Closes the stream.
 */
- (void)close;

/// \cond internal




- (BOOL)_isWaitingForDelimiter;
/// \endcond
@end







>
>
>
>



802
803
804
805
806
807
808
809
810
811
812
813
814
815

/**
 * \brief Closes the stream.
 */
- (void)close;

/// \cond internal
- (size_t)_readNBytes: (size_t)length
	   intoBuffer: (void*)buffer;
- (void)_writeNBytes: (size_t)length
	  fromBuffer: (const void*)buffer;
- (BOOL)_isWaitingForDelimiter;
/// \endcond
@end