@@ -46,12 +46,12 @@ * @param length The length of the data that has been read * @param exception An exception which occurred while reading or `nil` on * success * @return A bool whether the same block should be used for the next read */ -typedef bool (^of_stream_async_read_block_t)(OFStream *stream, void *buffer, - size_t length, id _Nullable exception); +typedef bool (^of_stream_async_read_block_t)(OF_KINDOF(OFStream *) stream, + void *buffer, size_t length, id _Nullable exception); /*! * @brief A block which is called when a line was read from the stream. * * @param stream The stream on which a line was read @@ -59,11 +59,11 @@ * occurred * @param exception An exception which occurred while reading or `nil` on * success * @return A bool whether the same block should be used for the next read */ -typedef bool (^of_stream_async_read_line_block_t)(OFStream *stream, +typedef bool (^of_stream_async_read_line_block_t)(OF_KINDOF(OFStream *) stream, OFString *_Nullable line, id _Nullable exception); /*! * @brief A block which is called when data was written to the stream. * @@ -78,11 +78,11 @@ * success * @return The length to repeat the write with or 0 if it should not repeat. * The buffer may be changed, so that every time a new buffer and length * can be specified while the callback stays the same. */ -typedef size_t (^of_stream_async_write_block_t)(OFStream *stream, +typedef size_t (^of_stream_async_write_block_t)(OF_KINDOF(OFStream *) stream, const void *_Nonnull *_Nonnull buffer, size_t bytesWritten, id _Nullable exception); #endif /*! @@ -231,11 +231,11 @@ * called again with the same buffer and exact length when more * data has been received. If you want the next method in the * queue to handle the data received next, you need to return * false from the method. * @param selector The selector to call on the target. The signature must be - * `bool (OFStream *stream, void *buffer, size_t size, + * `bool (OFStream *stream, void *buffer, size_t length, * id context, id exception)`. * @param context A context object to pass along to the target */ - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length