Contents

NSMachPort

A port that can be used as an endpoint for distributed object connections (or raw messaging).

Declaration

class NSMachPort

Overview

NSMachPort is a subclass of Port that wraps a Mach port, the fundamental communication port in macOS. NSMachPort allows for local (on the same machine) communication only. A companion class, SocketPort, allows for both local and remote distributed object communication, but may be more expensive than NSMachPort for the local case.

To use NSMachPort effectively, you should be familiar with Mach ports, port access rights, and Mach messages. See the Mach OS documentation for more information.

Topics

Creating and Initializing

Getting the Mach Port

Scheduling the Port on a Run Loop

Getting and Setting the Delegate

Constants

See Also

Legacy