O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSMachPort — Mac OS X 10.0

Synopsis

This subclass of NSPort provides an object-oriented wrapper to Mach IPC ports, which can be used either as endpoint for distributed object connections, or for raw messaging. NSMachPort objects only support local messaging; NSSocketPort provides support for remote messaging over a network.

image with no caption

@interface NSMachPort : NSPort
                                  // Initializers
   - (id)initWithMachPort:(int)machPort;
                                  // Class Methods
   + (NSPort *)portWithMachPort:(int)machPort;
                                  // Instance Methods
   - (int)machPort;
   - (void)removeFromRunLoop:(NSRunLoop *)runLoop 
                                 forMode:(NSString *)mode;
   - (void)scheduleInRunLoop:(NSRunLoop *)runLoop 
                                 forMode:(NSString *)mode;
                                 // Methods Implemented by the Delegate
   - (void)handleMachMessage:(void *)msg;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required