Proxies, Bytes, and CFNetwork
Proxies, Bytes, and CFNetwork
- Subject: Proxies, Bytes, and CFNetwork
- From: "Francois Boissonneault" <email@hidden>
- Date: Fri, 11 Apr 2003 10:16:38 -0400
- Thread-topic: Proxies, Bytes, and CFNetwork
Hi guys,
I have been playing with the CFNetwork stuff for a couple of days now and I'm still pretty confused with the proxy stuff. I have tried a couple of things already but I'm wondering what would be the safest way, and it seems that there is a lot more to set the proxy, but they are all working differently than URLAccessManager. Now, I must also say that I did not find a lot of sample of proxy stuff for CFNetwork and I felt that the doc was a little bit short...
It might be useful to know that I'm working in CFM and that I've build a big wrapper around the CFNetwork function that I am retrieving with CFBundleGetFunctionPointerForName... I don't know if it's because of that, but I had trouble using the CFDictionnaryRef stuff, so I've decided to add it by using CFHTTPReadStreamSetProxy...
Now, since I can't pass any username and password right now, I guessed that I absolutely had to get the Header response property to see if an error occured and to add the authentification, but it is unclear when I can get it. I'm using a callback, and I know that it is never know when receving kCFStreamEventOpenCompleted but known when receiving bytes... but will I always have the header at the same time than my first bytes? Then I saw I should close the readStream and open a new one with the same request plus the authentification.. but what if then I get also a 401, which means also a request for username and password but for the server this time: can I use again CFReadStreamAddAuthentification over the same request for a second time?
I am also searching for a way of getting the total number of bytes the readStream will read, but I can't find any property about it. I have read on the old apple documentation that it's possible through the properties but they don't give more information.
If anybody knows where I could get more information about the proxies and CFNetwork or a sample about it, it would be very appreciated. Thanks in advance for any help from you guys.
-Frank
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.