Basic DO Questions
Basic DO Questions
- Subject: Basic DO Questions
- From: Richard Schreyer <email@hidden>
- Date: Fri, 12 Jul 2002 15:05:46 -0700
I am trying to find my way around Distributed Objects between separate processes by putting together a couple small test apps.
I put together a simple DO Server app that really doesn't provide any functionality except for advertising it's presence.
The guts of the server:
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
NSLog(@"server will finish launching");
connection = [NSConnection defaultConnection];
[connection setRootObject: self];
[connection setDelegate: self];
if ([connection registerName:@"DO Test"])
NSLog(@"Registered name \"DO Test\"");
else
NSLog(@"failed to register name");
}
and of the client:
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
NSLog(@"client will finish launching");
serverProxy = [[NSConnection rootProxyForConnectionWithRegisteredName:@"DO Test" host:nil] retain];
[serverProxy setProtocolForProxy:@protocol(ServerProtocol)];
NSLog(@"server proxy is %@", serverProxy);
}
Sending the log on the last line will print out <Server, 0xSomething>, but then the program will crash with a SIGBUS soon after. What am I doing wrong here?
Richard Schreyer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.