• 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: Can CFReadStream use proxy set in the system configuration automatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can CFReadStream use proxy set in the system configuration automatically?


  • Subject: Re: Can CFReadStream use proxy set in the system configuration automatically?
  • From: Quinn <email@hidden>
  • Date: Thu, 19 Mar 2009 10:57:37 +0000

At 13:27 +0800 19/3/09, µÀéuº· wrote:
Some one tell me that when using CFReadStream to query http, I don't have to care the proxy set in system configuration. Because CFReadStream can use the proxy set in system configuration.
But I can't find the related description in the document.
Can anyone tell me the fact?

CFStream will not automatically pick up the proxy settings. If you want to use the system-defined proxy settings, you have to get the settings from the system (more on this below) and apply them using various stream properties (for example, kCFStreamPropertySOCKSProxy and kCFStreamPropertyHTTPProxy).


To get the system proxy settings, you should use one of three different techniques:

o In Mac OS X 10.5 and later, or iPhone OS, the best approach is to use CFNetworkCopyProxiesForURL.

o If you don't have a URL handy, then on iPhone OS you can call CFNetworkCopySystemProxySettings to get the raw proxy settings.

o On Mac OS X, prior to 10.5, or if you don't have a URL handy, you can use SCDynamicStoreCopyProxies.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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: Can CFReadStream use proxy set in the system configuration automatically?
      • From: Jens Alfke <email@hidden>
References: 
 >Can CFReadStream use proxy set in the system configuration automatically? (From: 邓志坚 <email@hidden>)

  • Prev by Date: Socket recv problems in real-time context : lock or priority inversion issues?
  • Next by Date: Re: Can CFReadStream use proxy set in the system configuration automatically?
  • Previous by thread: Can CFReadStream use proxy set in the system configuration automatically?
  • Next by thread: Re: Can CFReadStream use proxy set in the system configuration automatically?
  • Index(es):
    • Date
    • Thread