Reads data from a readable stream.
- iOS 2.0+
- macOS 10.1+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The stream from which to read.
The buffer into which to place the data.
The size of
bufferand the maximum number of bytes to read.
The number of bytes read;
0 if the stream has reached its end; or
-1 if either the stream is not open or an error occurs.
stream is in the process of opening, this function waits until it has completed. This function blocks until at least one byte is available; it does not block until
buffer is filled. To avoid blocking, call this function only if
TRUE or after the stream’s client (set with
CFRead) is notified of a