Name
NSSocketPort — Mac OS X 10.0
Synopsis
This subclass of NSPort provides an interface to
objects that can serve as endpoints for distributed objects
connections over a network. NSSocketPort is
implemented using the BSD Sockets API, which makes it useful for raw
network communications in addition to serving as a component of the
distributed objects system. A socket file descriptor that is
suitable for use with the BSD Sockets API can be obtained by sending
a socket message to an instance of this class.
While local communication is supported in socket ports, it is
generally more efficient in terms of resource usage to use
NSMachPort or NSMessagePort for
local distributed objects connections.
|
|
@interface NSSocketPort : NSPort
|
// Initializers
|
- (id)init;
|
- (id)initRemoteWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol address:(NSData *)address; |
- (id)initRemoteWithTCPPort:(unsigned short)port host:(NSString *)hostName; |
- (id)initWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol address:(NSData *)address; |
- (id)initWithProtocolFamily:(int) |
- (id)initWithTCPPort:(unsigned short)port; |
// Instance Methods
|
- (NSData *)address;
|
- (int)protocol;
|
- (int)protocolFamily;
|
- (NSSocketNativeHandle)socket;
|
- (int)socketType;
|
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