Mac Developer Library

Developer

Foundation Framework Reference NSMachPortDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSMachPortDelegate

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

Inheritance


Not Applicable

Import Statement


import Foundation @import Foundation;

Availability


Available in OS X v10.6 and later.
  • Process an incoming Mach message.

    Declaration

    Swift

    optional func handleMachMessage(_ machMessage: UnsafeMutablePointer<Void>)

    Objective-C

    - (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:.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

    Available as part of an informal protocol prior to OS X v10.6.