• 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: What's the best way to run an NSURLProtocol session?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the best way to run an NSURLProtocol session?


  • Subject: Re: What's the best way to run an NSURLProtocol session?
  • From: Daryle Walker <email@hidden>
  • Date: Sat, 18 Oct 2014 17:09:18 -0400

On Oct 17, 2014, at 4:25 AM, Quinn The Eskimo! <email@hidden> wrote:

> On 16 Oct 2014, at 23:48, Daryle Walker <email@hidden> wrote:
>
>> What's the best way to run an NSURLProtocol session?
>
> I don't think there is a single "best way"; it depends on what your back end APIs look like.  The critical thing is that you follow the threading rules outlined in the CustomHTTPProtocol read me.

I haven’t done my back-end yet; I don’t want to start off in the wrong direction. So I’m partly looking for how NOT to do it.

> I realise that this is kinda vague.  If you supply more details about what your protocol is doing, I will offer up a more concrete response.

Right now, I’m making a NSURLProtocol to implement “about” URLs. The data is always local. I want to use (GCD-backed) NSOperation instances. How strict is the requirement that the NSURLProtocolClient methods have to be called from the client thread, since you (generally) don’t control which thread(s) an NSOperationQueue works with? Or can the threading NSOperationQueue uses be controlled in a way compatible with NSURLProtocolClient?

This subclass is also practice for a second one which will use network calls.

—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: What's the best way to run an NSURLProtocol session?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
References: 
 >What's the best way to run an NSURLProtocol session? (From: Daryle Walker <email@hidden>)
 >Re: What's the best way to run an NSURLProtocol session? (From: "Quinn \"The Eskimo!\"" <email@hidden>)

  • Prev by Date: Re: What's the best way to run an NSURLProtocol session?
  • Next by Date: Re: What's the best way to run an NSURLProtocol session?
  • Previous by thread: Re: Offline initiation of NSURLSession (was: What's the best way to run an NSURLProtocol session?)
  • Next by thread: Re: What's the best way to run an NSURLProtocol session?
  • Index(es):
    • Date
    • Thread