Contents

vmnet_stop_interface(_:_:_:)

Stops I/O on the virtual interface.

Declaration

func vmnet_stop_interface(_ interface: interface_ref, _ queue: dispatch_queue_t, _ handler: @escaping  vmnet_interface_completion_handler_t) -> vmnet_return_t

Parameters

  • interface:

    The interface to halt I/O on.

  • queue:

    The queue to schedule the stop handler on.

  • handler:

    The block that is invoked when the stop interface request completes.

Return Value

VMNET_SUCCESS if the framework scheduled the completion handler, an error code otherwise.

Discussion

Once an app calls this function, subsequent calls to read or write packets on this interface fail. If the app created the interface through vmnet_interface_start_with_network(_:_:_:_:), this call releases the associated network object.

See Also

Starting and stopping interfaces