• 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: Tracking multiple NSURLConnections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking multiple NSURLConnections


  • Subject: Re: Tracking multiple NSURLConnections
  • From: Alexander Spohr <email@hidden>
  • Date: Tue, 29 Jun 2010 18:23:22 +0200

Not sure if I understood the problem. But why not just use the NSURLConnection objects themselves?
The delegate methods give you the corresponding NSURLConnection.

	atze


Am 29.06.2010 um 18:00 schrieb email@hidden:

> I have and app that needs to send out multiple connection attempts. NSURLConnection doesn't appear to allow one to distinguish between connections. I found a couple of posts at cocoabuilder that provide some guidance, but I wanted to ask about my approach. I'm writing for 10.6, so I'm using a category on NSURLConnection combined with associative references. The methods in the category are below, but basically I associate an integer with a given connection and track the connections using that. So, short of subclassing or following what I've found in the archives, does this make sense? Am I missing any details that might cause this to fail?
> Thanks
>
>
> -(void)setTagValue:(NSNumber*)val{
>
> objc_setAssociatedObject(self, @selector(tagValue), val, OBJC_ASSOCIATION_RETAIN);
> }
>
> -(NSNumber *) tagValue {
>
> return objc_getAssociatedObject(self, @selector(tagValue));
> }
> _______________________________________________
>
> 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

_______________________________________________

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: Re: Tracking multiple NSURLConnections
      • From: email@hidden
References: 
 >Tracking multiple NSURLConnections (From: email@hidden)

  • Prev by Date: Re: How to revert to an unedited document & window?
  • Next by Date: Re: Re: Tracking multiple NSURLConnections
  • Previous by thread: Tracking multiple NSURLConnections
  • Next by thread: Re: Re: Tracking multiple NSURLConnections
  • Index(es):
    • Date
    • Thread