Is it possible to make simultaneously two requests in parallel to the same server using NSURLConnection?
I'm trying to do it, and it looks like the second request do not start until the first one finishes.
From stackoverflow
-
You need to create two NSURLConnection objects.
-
If you use the sync version of NSURLConnection
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)erroryou need to start two threads to get the behavior you want, you can do this my moving the download in a own method and call this over:
- (void)performSelectorInBackground:(SEL)aSelector withObject:(id)argThe other way would be to use Asynchronously version of NSURLConnection, see docu.
0 comments:
Post a Comment