NSMachPortDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/Foundation.framework
Availability
Available in OS X v10.6 and later.
Companion guide
Declared in
NSPort.h
Related sample code

Overview

The NSMachPortDelegate protocol defines the optional methods implemented by delegates of NSMachPort objects.

Tasks

Handling Mach Messages

Instance Methods

handleMachMessage:

Process an incoming Mach message.

- (void)handleMachMessage:(void *)machMessage
Parameters
machMessage

A pointer to a Mach message, cast as a pointer to void.

Discussion

The delegate should interpret this data as a pointer to a Mach message beginning with a msg_header_t structure and should handle the message appropriately.

The delegate should implement either handleMachMessage: or the NSPortDelegate Protocol protocol method handlePortMessage:.

Availability
  • Available in OS X v10.0 and later.
  • Available as part of an informal protocol prior to OS X v10.6.
Declared In
NSPort.h