port(withMachPort:options:)
Creates and returns a port object configured with the specified options and the given Mach port.
Declaration
class func port(withMachPort machPort: UInt32, options f: NSMachPort.Options = []) -> PortParameters
- machPort:
The Mach port for the new port. This parameter should originally be of type mach_port_t.
- f:
Specifies options for what to do with the underlying port rights when the
NSMachPortobject is invalidated or destroyed. For a list of constants, seeMach Port Rights.
Return Value
An NSMachPort object that uses machPort to send or receive messages.
Discussion
Creates the port object if necessary. Depending on the access rights associated with machPort, the new port object may be usable only for sending messages.