@@ -33,11 +33,10 @@ /*! @file */ @class OFStream; @class OFData; -@class OFException; #if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_BLOCKS) /*! * @brief A block which is called when data was read from the stream. * @@ -47,11 +46,11 @@ * @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, OFException *_Nullable exception); + 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 @@ -60,11 +59,11 @@ * @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, - OFString *_Nullable line, OFException *_Nullable exception); + OFString *_Nullable line, id _Nullable exception); #endif /*! * @class OFStream OFStream.h ObjFW/OFStream.h * @@ -167,11 +166,11 @@ * 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 length, - * id context, OFException *exception)`. + * id context, id exception)`. */ - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length target: (id)target selector: (SEL)selector @@ -198,11 +197,11 @@ * 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, - * id context, OFException *exception)`. + * id context, id exception)`. */ - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length target: (id)target selector: (SEL)selector @@ -622,11 +621,11 @@ * again when the next line has been received. If you want the * next method in the queue to handle the next line, you need to * return false from the method * @param selector The selector to call on the target. The signature must be * `bool (OFStream *stream, OFString *line, id context, - * OFException *exception)`. + * id exception)`. */ - (void)asyncReadLineWithTarget: (id)target selector: (SEL)selector context: (nullable id)context; @@ -642,12 +641,12 @@ * been received. If the method returns true, it will be called * again when the next line has been received. If you want the * next method in the queue to handle the next line, you need to * return false from the method * @param selector The selector to call on the target. The signature must be - * `bool (OFStream *stream, OFString *line, - * id context, OFException *exception)`. + * `bool (OFStream *stream, OFString *line, id context, + * id exception)`. */ - (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding target: (id)target selector: (SEL)selector context: (nullable id)context; @@ -773,11 +772,11 @@ - (void)flushWriteBuffer; /*! * @brief Writes from a buffer into the stream. * - * @param buffer The buffer from which the data is written to the stream + * @param buffer The buffer from which the data is written into the stream * @param length The length of the data that should be written */ - (void)writeBuffer: (const void *)buffer length: (size_t)length;