Re: How to get proxy settings for use with CFStream?
Re: How to get proxy settings for use with CFStream?
- Subject: Re: How to get proxy settings for use with CFStream?
- From: Jens Alfke <email@hidden>
- Date: Tue, 28 May 2013 13:14:28 -0700
On May 28, 2013, at 12:59 PM, Josh Graessley < email@hidden> wrote:
Some proxy settings may involve running a _javascript_ to evaluate what proxy to use. I think that’s what kCFProxyTypeAutoConfigurationURL means. You may need to use something like CFNetworkCopyProxiesForAutoConfigurationScript to run the script.
Jeebus. It’s even nastier than I thought, then. If there’s any way you can use NSURLRequest/NSURLConnection instead, the world of hurt known as proxies will no longer be your problem :)
Unfortunately not — it’s a long sad story, but I tried valiantly to use NSURLConnection for this purpose, but ran into bugs and limitations that can’t be worked around.
- The major bug: The system seems to buffer up all of a chunked response’s data until EOF, and only then send it to the delegate. That totally doesn’t work for me because this is a Comet-type connection, i.e. the server sends data periodically but never closes the response. So I never receive anything. - The limitation: Fixed-size socket pool used for all NSURLConnections to the same host. I frequently ran into starvation problems where requests timed out because other lengthy requests kept the sockets busy (especially the never-ending request in the previous paragraph.) There also seem to be serious scheduling problems with the way requests get assigned to sockets, as far as I can tell.
—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