<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMachPortDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSMachPortDelegate"
  },
  "title" : "NSMachPortDelegate"
}
-->

# NSMachPortDelegate

An interface for handling incoming Mach messages.

```
protocol NSMachPortDelegate : PortDelegate
```

## Overview

Delegates of [`NSMachPort`](/documentation/Foundation/NSMachPort) objects optionally adopt this protocol.

## Topics

### Handling Mach messages

[`-  handleMachMessage:`](/documentation/Foundation/NSMachPortDelegate/handleMachMessage(_:))

Process an incoming Mach message.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`PortDelegate`](/documentation/Foundation/PortDelegate)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)