Hi,

Really going mad, it is taking long time response when i am trying to get vended Object from the remote machine which doesn't exist in the network. . I am facing same long time delay(more than 60 sec) when i am trying to get vended object from the remote machine which gone to sleep.
          Below is the code

-(id)serverObject {
        id serverObject = nil;
        @try{
                serverObject = [[self serverConnection] rootProxy];
            }...@catch(NSException *exception)  {
                serverObject = nil;
                [self destroyConnection];
             }
        return serverObject;
}
-(NSConnection *)serverConnection {
        if(!serverConnection)   {
NSString *webAppURLString = [[NSUserDefaults standardUserDefaults] objectForKey:kPXWebAppURL];
                NSString *host = nil;
                if(!(webAppURLString && [webAppURLString length] > 0)) {
                        host =[[NSProcessInfo processInfo] hostName];
                } else {
                        host = [[NSURL URLWithString:webAppURLString] host];
                }
NSSocketPort *port = [[NSSocketPort alloc] initRemoteWithTCPPort:PORT_NUMBER host:host]; serverConnection = [[NSConnection alloc] initWithReceivePort:nil sendPort:port];
                [serverConnection setDelegate:self];
                [serverConnection setRequestTimeout:1.0f];
                [serverConnection setReplyTimeout:1.0f];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleConnectionDied:) name:NSConnectionDidDieNotification object:serverConnection];
                [port release];
        }
        return serverConnection;
}


Please help me out in this

Regards
SKiranKumar
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to