@@ -59,17 +59,16 @@ * * This class is a class cluster and returns a suitable OFTLSStream subclass, * if available. * * Subclasses need to override @ref lowlevelReadIntoBuffer:length:, - * @ref lowlevelWriteBuffer:length: and - * @ref asyncPerformClientHandshakeWithHost:runLoopMode:. The method - * @ref hasDataInReadBuffer should be overridden to return `true` if the TLS - * stream has cached unprocessed data internally, while returning - * `self.underlyingStream.hasDataInReadBuffer` if it does not have any - * unprocessed data. In order to get access to the underlying stream, - * @ref underlyingStream can be used. + * @ref lowlevelWriteBuffer:length:, + * @ref lowlevelHasDataInReadBuffer and + * @ref asyncPerformClientHandshakeWithHost:runLoopMode:. + * + * In order to get access to the underlying stream, @ref underlyingStream can + * be used. */ @interface OFTLSStream: OFStream { OFStream @@ -107,11 +106,11 @@ * @param stream The stream to use as underlying stream. Must not be closed * before the TLS stream is closed. * @return A new, autoreleased TLS stream */ + (instancetype)streamWithStream: (OFStream *)stream; + OFReadyForWritingObserving> *)stream; /** * @brief Initializes the TLS stream with the specified stream as its * underlying stream. * @@ -118,11 +117,11 @@ * @param stream The stream to use as underlying stream. Must not be closed * before the TLS stream is closed. * @return An initialized TLS stream */ - (instancetype)initWithStream: (OFStream *)stream + OFReadyForWritingObserving> *)stream OF_DESIGNATED_INITIALIZER; /** * @brief Asynchronously performs the TLS client handshake for the specified * host and calls the delegate afterwards.