Contents

enqueueIORequest(with:completionTimeout:completionHandler:)

Enqueues an input/output request on the pipe.

Declaration

func enqueueIORequest(with data: NSMutableData?, completionTimeout: TimeInterval, completionHandler: (@Sendable (IOReturn, Int) -> Void)? = nil) throws
func enqueueIORequest(with data: NSMutableData?, completionTimeout: TimeInterval) async throws -> (IOReturn, Int)

Parameters

  • data:

    An Nsmutabledata object defining the memory to use for the transfer. Use Nil 227m0 to send a zero-length packet.

  • completionTimeout:

    A Timeinterval value representing the timeout of the request. If 0, the request never times out. Use Iousbhostdefaultcontrolcompletiontimeout unless there’s a need for a specific timeout.

  • completionHandler:

    An Iousbhostcompletionhandler that runs when the request completes, or times out after the call returns successfully. If the method returns with an error, the completion handler doesn’t run.

Discussion

Use this method to issue an asynchronous input/output request on a bulk or interrupt pipe.

See Also

Sending Bulk and Interrupt I/O