Name
NSConnection — Mac OS X 10.0
Synopsis
This class declares the interface to objects that manage
communications between objects that reside in separate processes. The
NSConnection class forms the groundwork for
Cocoa’s distributed objects system, which is
described in more detail in Chapter 6.
NSConnection supports
inter-process communication on the
local host, as well as between two hosts over a network.
NSConnection is frequently used to facilitate
communication between threads in a multithreaded application. Clients
use the NSConnection class primarily for vending
objects (making them available to other processes), accessing vended
objects, and for fine-tuning communication parameters.
|
![]()
|
@interface NSConnection : NSObject
|
// Convenience Constructors
|
+ (NSConnection *)connectionWithReceivePort:(NSPort *)receivePort sendPort:(NSPort *)sendPort; |
+ (NSConnection *)connectionWithRegisteredName:(NSString *)name host:(NSString *)hostName; |
+ (NSConnection *)connectionWithRegisteredName:(NSString *)name host:(NSString *)hostName usingNameServer:(NSPortNameServer *)server; |
// Initializers
|
- (id)initWithReceivePort:(NSPort *)receivePort sendPort:(NSPort *)sendPort; |
// Accessor Methods
|
- (void)setRequestTimeout:(NSTimeInterval)ti; |
- (NSTimeInterval)requestTimeout;
|
- (void)setReplyTimeout:(NSTimeInterval)ti; |
- (NSTimeInterval)replyTimeout;
|
- (void)setRootObject ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
