• 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
Re: Long Time Dealy When getting Vended Object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long Time Dealy When getting Vended Object


  • Subject: Re: Long Time Dealy When getting Vended Object
  • From: Kiran Kumar S <email@hidden>
  • Date: Fri, 24 Apr 2009 09:54:32 +0530


When accessing rootProxy from connection Object, in the below code i marked in red


-(id)serverObject {
	id serverObject = nil;

	@try{
		NSConnection *connection = [self serverConnection];
		serverObject = [connection rootProxy];         //Here i got struck
	}@catch(NSException *exception)	{
	    serverObject = nil;
	    [self destroyConnection];
         }
	return serverObject;
}

-(NSConnection *)serverConnection {
if(!serverConnection) {
NSString *webAppURLString = [[NSUserDefaults standardUserDefaults] objectForKey:WebAppURL];
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;
}


Regards
SKiran

On 24-Apr-09, at 6:11 AM, Ken Thomases wrote:

On Apr 23, 2009, at 12:05 AM, Kiran Kumar S wrote:

These are the lines of code i got blocked

1. When Remote Machine is not in Network

553 -[PXDistributedObjectsClient serverObjectWithReestablishingConnection]
553 -[PXDistributedObjectsClient serverObject]
553 _CF_forwarding_prep_0 553 ___forwarding___
553 -[NSDistantObject forwardInvocation:]
553 -[NSConnection sendInvocation:internal:]
553 -[NSConnection sendInvocation:internal:]

Hmm. I was wrong to suggest sampling. I doesn't resolve to specific lines of code, just functions/methods. Better to break into the program using the debugger (Control-c if using gdb directly, the Pause button in Xcode's debugger) to get the specific line within the -serverObject method.


Of course, line numbers won't be meaningful to me without your whole source file, so just show the contents of the line.

Regards,
Ken




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Long Time Dealy When getting Vended Object
      • From: Ken Thomases <email@hidden>
References: 
 >Long Time Dealy When getting Vended Object (From: Kiran Kumar S <email@hidden>)
 >Re: Long Time Dealy When getting Vended Object (From: Ken Thomases <email@hidden>)
 >Re: Long Time Dealy When getting Vended Object (From: Kiran Kumar S <email@hidden>)
 >Re: Long Time Dealy When getting Vended Object (From: Kiran Kumar S <email@hidden>)
 >Re: Long Time Dealy When getting Vended Object (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: CF autorelease?
  • Next by Date: Re: Long Time Dealy When getting Vended Object
  • Previous by thread: Re: Long Time Dealy When getting Vended Object
  • Next by thread: Re: Long Time Dealy When getting Vended Object
  • Index(es):
    • Date
    • Thread