Writes data to a writable stream.
- iOS 2.0+
- macOS 10.1+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The stream to which to write.
The buffer holding the data to write.
The number of bytes from
The number of bytes successfully written,
0 if the stream has been filled to capacity (for fixed-length streams), 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. If the stream is not full, this call blocks until at least one byte is written; it does not block until all the bytes in
buffer is written. To avoid blocking, call this function only if
true or after the stream’s client (set with
CFWrite) is notified of a