Function

CFReadStreamHasBytesAvailable(_:)

Returns a Boolean value that indicates whether a readable stream has data that can be read without blocking.

Declaration

func CFReadStreamHasBytesAvailable(_ stream: CFReadStream!) -> Bool

Parameters

stream

The stream to examine.

Return Value

TRUE if data can be read from stream without blocking, otherwise FALSE. If stream cannot tell if data is available without actually trying to read the data, this function returns TRUE.

See Also

Examining Stream Properties

func CFReadStreamGetBuffer(CFReadStream!, CFIndex, UnsafeMutablePointer<CFIndex>!) -> UnsafePointer<UInt8>!

Returns a pointer to a stream’s internal buffer of unread data, if possible.

func CFReadStreamCopyError(CFReadStream!) -> CFError!

Returns the error associated with a stream.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software