#include <stdarg.h>
import "OFObject.h"
import "OFString.h"
import "OFRunLoop.h"
import "OFKernelEventObserver.h"
Go to the source code of this file.
◆ OFStreamAsyncReadBlock
typedef bool(^ OFStreamAsyncReadBlock) (size_t length, id exception) |
A block which is called when data was read asynchronously from a stream.
- Parameters
-
length | The length of the data that has been read |
exception | An exception which occurred while reading or nil on success |
- Returns
- A bool whether the same block should be used for the next read
◆ OFStreamAsyncReadLineBlock
typedef bool(^ OFStreamAsyncReadLineBlock) (OFString *line, id exception) |
A block which is called when a line was read asynchronously from a stream.
- Parameters
-
line | The line which has been read or nil when the end of stream occurred |
exception | An exception which occurred while reading or nil on success |
- Returns
- A bool whether the same block should be used for the next read
◆ OFStreamAsyncWriteDataBlock
typedef OFData *(^ OFStreamAsyncWriteDataBlock) (size_t bytesWritten, id exception) |
A block which is called when data was written asynchronously to a stream.
- Parameters
-
bytesWritten | The number of bytes which have been written. This matches the length of the specified data on the asynchronous write if no exception was encountered. |
exception | An exception which occurred while writing or nil on success |
- Returns
- The data to repeat the write with or nil if it should not repeat
◆ OFStreamAsyncWriteStringBlock
typedef OFString *(^ OFStreamAsyncWriteStringBlock) (size_t bytesWritten, id exception) |
A block which is called when a string was written asynchronously to a stream.
- Parameters
-
bytesWritten | The number of bytes which have been written. This matches the length of the specified data on the asynchronous write if no exception was encountered. |
exception | An exception which occurred while writing or nil on success |
- Returns
- The string to repeat the write with or nil if it should not repeat