4 Replies Latest reply: Aug 14, 2008 10:21 AM by BPerfetto
BPerfetto Level 1 (0 points)

I'm currently using the following code to interface with a PHP server and get responses:

NSData* myData = [NSData dataWithContentsOfURL: [NSURL URLWithString:myURL]];

This works great and myData returns either nil or the response from the server. The only problem is that if the connection is very weak or slow then my program is stuck until this line of code returns. Is there a way to set the timeout interval for this call?


Mac Mini, Mac OS X (10.5.2)