Re: Implementing proxy support
Re: Implementing proxy support
- Subject: Re: Implementing proxy support
- From: Jens Alfke <email@hidden>
- Date: Sun, 20 Jul 2014 11:40:26 -0700
On Jul 20, 2014, at 5:11 AM, Daryle Walker < email@hidden> wrote: On another note, I read NSURLProtocol, and I’m wondering where the network code actually goes. Putting it in startLoading: would cause reentry issues with stopLoading: (and blocking). I guess I could implement with NSOperations (and queue) or NSStream delegates, doing the setup in startLoading:.
The networking code you use in an NSURLProtocol should be asynchronous (or shifted to another thread/queue.) Never block the thread your NSURLProtocol instance is called on — it’s a single thread used by CFNetwork for all its internal processing, and blocking it will cause performance problems in your app.
—Jens |
_______________________________________________
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