mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
MacOS-X compatibility updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26598 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
35e907b7ed
commit
f1d83b9f14
42 changed files with 827 additions and 13 deletions
|
@ -647,6 +647,42 @@ static NSLock *cached_proxies_gate = nil;
|
|||
return AUTORELEASE(proxy);
|
||||
}
|
||||
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root
|
||||
{
|
||||
return [self serviceConnectionWithName: name
|
||||
rootObject: root
|
||||
usingNameServer: [NSPortNameServer systemDefaultPortNameServer]];
|
||||
}
|
||||
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root
|
||||
usingNameServer: (NSPortNameServer *)server
|
||||
{
|
||||
NSConnection *c;
|
||||
NSPort *p;
|
||||
|
||||
if ([server isKindOfClass: [NSMessagePortNameServer class]] == YES)
|
||||
{
|
||||
p = [NSMessagePort port];
|
||||
}
|
||||
else if ([server isKindOfClass: [NSSocketPortNameServer class]] == YES)
|
||||
{
|
||||
p = [NSSocketPort port];
|
||||
}
|
||||
else
|
||||
{
|
||||
p = nil;
|
||||
}
|
||||
|
||||
c = [[NSConnection alloc] initWithReceivePort: p sendPort: nil];
|
||||
if ([c registerName: name withNameServer: server] == NO)
|
||||
{
|
||||
DESTROY(c);
|
||||
}
|
||||
return AUTORELEASE(c);
|
||||
}
|
||||
|
||||
+ (void) _timeout: (NSTimer*)t
|
||||
{
|
||||
NSArray *cached_locals;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue