---
title: NSMachPortDelegate
framework: foundation
role: symbol
role_heading: Protocol
path: foundation/nsmachportdelegate
---

# NSMachPortDelegate

An interface for handling incoming Mach messages.

## Declaration

```swift
protocol NSMachPortDelegate : PortDelegate
```

## Overview

Overview Delegates of NSMachPort objects optionally adopt this protocol.

## Topics

### Handling Mach messages

- [handleMachMessage(_:)](foundation/nsmachportdelegate/handlemachmessage(_:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [PortDelegate](foundation/portdelegate.md)

## See Also

### Legacy

- [NSMachPort](foundation/nsmachport.md)
- [MessagePort](foundation/messageport.md)
- [PortDelegate](foundation/portdelegate.md)
- [PortMessage](foundation/portmessage.md)
- [NSProtocolChecker](foundation/nsprotocolchecker.md)
