ObjFW  Diff

Differences From Artifact [57e418e361]:

To Artifact [74effa40b4]:


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 *	 the methods that do the actual work. OFStream uses those for all other
 *	 methods and does all the caching and other stuff for you. If you
 *	 override these methods without the lowlevel prefix, you *will* break
 *	 caching and get broken results!
 */
@interface OFStream: OFObject <OFCopying>
{
	char   *_cache;
	char   *_writeBuffer;
	size_t _cacheLength, _writeBufferLength;
	BOOL   _writeBufferEnabled;
	BOOL   _blocking, _waitingForDelimiter;
}

#ifdef OF_HAVE_PROPERTIES
@property (getter=isWriteBufferEnabled) BOOL writeBufferEnabled;
@property (getter=isBlocking) BOOL blocking;
@property (readonly, getter=isAtEndOfStream) BOOL atEndOfStream;
#endif







<
|
|
<
|







53
54
55
56
57
58
59

60
61

62
63
64
65
66
67
68
69
 *	 the methods that do the actual work. OFStream uses those for all other
 *	 methods and does all the caching and other stuff for you. If you
 *	 override these methods without the lowlevel prefix, you *will* break
 *	 caching and get broken results!
 */
@interface OFStream: OFObject <OFCopying>
{

	char *_readBuffer, *_writeBuffer;
	size_t _readBufferLength, _writeBufferLength;

	BOOL _writeBufferEnabled, _blocking, _waitingForDelimiter;
}

#ifdef OF_HAVE_PROPERTIES
@property (getter=isWriteBufferEnabled) BOOL writeBufferEnabled;
@property (getter=isBlocking) BOOL blocking;
@property (readonly, getter=isAtEndOfStream) BOOL atEndOfStream;
#endif
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
 * @param arguments The arguments used in the format string
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString*)format
	    arguments: (va_list)arguments;

/*!
 * @brief Returns the number of bytes still present in the internal read cache.
 *
 * @return The number of bytes still present in the internal read cache.
 */
- (size_t)pendingBytes;

/*!
 * @brief Returns whether the stream is in blocking mode.
 *
 * @return Whether the stream is in blocking mode
 */
- (BOOL)isBlocking;







|

|

|







978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
 * @param arguments The arguments used in the format string
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString*)format
	    arguments: (va_list)arguments;

/*!
 * @brief Returns the number of bytes still present in the internal read buffer.
 *
 * @return The number of bytes still present in the internal read buffer.
 */
- (size_t)numberOfBytesInReadBuffer;

/*!
 * @brief Returns whether the stream is in blocking mode.
 *
 * @return Whether the stream is in blocking mode
 */
- (BOOL)isBlocking;