@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2022 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -216,10 +216,11 @@ * @brief Whether the stream can block. * * By default, a stream can block. * On Win32, setting this currently only works for sockets! * + * @throw OFGetOptionFailedException The option could not be retrieved * @throw OFSetOptionFailedException The option could not be set */ @property (nonatomic) bool canBlock; /** @@ -1388,8 +1389,20 @@ * implementation when subclassing! * * @return Whether the lowlevel is at the end of the stream */ - (bool)lowlevelIsAtEndOfStream; + +/** + * @brief Returns whether the lowlevel has data in the read buffer. + * + * @warning Do not call this directly! + * + * @note Override this method in case your stream can buffer data itself, such + * as when implementing @ref OFTLSStream. If not overridden, it always + * returns false. + * @return Whether the lowlevel has data in the read buffer + */ +- (bool)lowlevelHasDataInReadBuffer; @end OF_ASSUME_NONNULL_END