enqueueIORequest(with:completionHandler:)
Enqueues an input/output request on the stream.
Declaration
func enqueueIORequest(with data: NSMutableData?, completionHandler: (@Sendable (IOReturn, Int) -> Void)? = nil) throwsfunc enqueueIORequest(with data: NSMutableData?) async throws -> (IOReturn, Int)Parameters
- data:
An Nsmutabledata object defining the memory to use for the transfer.
- completionHandler:
An Iousbhostcompletionhandler that runs when the request completes. The
completionHandlerdoesn’t run if the method returns an error.
Discussion
This method sends an asynchronous request on the stream.