• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSDistributedObjects & Fast User Switching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDistributedObjects & Fast User Switching


  • Subject: NSDistributedObjects & Fast User Switching
  • From: Pat Homelvig <email@hidden>
  • Date: Sat, 21 May 2005 16:05:58 -0600

We have a client / server setup, and are using distributed objects to connect between the two.

For a demo that we are giving, we were going to have four clients connect up to the server, with each client as a separate login on the same machine via "Fast User Switching". The server is also running on the same machine, started up ahead of time by the first user.

We start up the server, and then start up the client under the same user's login, and everything works fine, However in starting up the client on any of the other logins, it can't connect up to the server. Both the connection and proxy returns nil.

Following is the code we are using:

Server:

    NSConnection *conn = [NSConnection defaultConnection];
    // Configure the connection
    DemoDataServer *dataServer = [[DemoDataServer alloc] init];
    [conn setRootObject:dataServer];
    if ([conn registerName:@"DemoServer"] == NO) {
        /* Handle error. */
        NSLog(@"Unable to register connection as \"DemoServer\"");
        exit(-1);
    }
        // Start the connection
    [[NSRunLoop currentRunLoop] run];



Client:

NSConnection *conn = [NSConnection connectionWithRegisteredName:@"DemoServer" host:nil];
serverProxy = [[conn rootProxy] retain];
[serverProxy setProtocolForProxy:@protocol (QCMDataServerProtocol)];




As I said above, conn and serverProxy both are nil on any user but the user that starts the server.

Any ideas?

Thanks

Pat


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSDistributedObjects & Fast User Switching
      • From: email@hidden
  • Prev by Date: Re: Strategy for using common classes in multiple Cocoa plug-ins?
  • Next by Date: Re: Plugin support for Apple's Mail application
  • Previous by thread: Re: problem with pure automatic KVO for array (no controllers...)
  • Next by thread: Re: NSDistributedObjects & Fast User Switching
  • Index(es):
    • Date
    • Thread