Re: accessing the CFSteam that NSURLConnection is using?
Re: accessing the CFSteam that NSURLConnection is using?
- Subject: Re: accessing the CFSteam that NSURLConnection is using?
- From: Simon Spero <email@hidden>
- Date: Wed, 12 Oct 2005 07:07:07 -0400
Aren't CFStreams troll-free bridged? I remember trying it once and
it worked, but that was just to call description :)
[check]
Ah, yes they are:
"CFReadStream is “toll-free bridged” with its Cocoa Foundation
counterpart, NSInputStream"
- Introduction to CFReadStream Reference.
This isn't mentioned in the list in of types in table 1 of the Carbon/
Cocoa integration guide; I just filed a doc bug on that.
Simon
On Oct 12, 2005, at 3:28 AM, sean wrote:
NSURLConnection was treating me really well and give me almost
everything I need, but now that I'm at the end of my project and I'm
working on the last features, it jumps up and bites me!
For downloads, I show the user a progress indicator, but
NSURLConnection/NSURLResponse do not support accessing the uploaded
write count via the delegate for upload POST requests. (not in a
documented fashion at least)
I was looking around in the CFNetworking documentation and it looks
like if I can get access to the CFStream that the NSURLConnection us
using, I could query it for the current upload info via
kCFStreamPropertyHTTPRequestBytesWrittenCount.
kCFStreamPropertyHTTPRequestBytesWrittenCount
"HTTP Request Bytes Written property. This property can only be
retrieved; it cannot be set. The value of this property is a CFNumber
containing the number of body bytes that have been written to the
server thus far. HTTP header bytes are not included in the count. You
can use this property to track the progress of HTTP uploads that take
a substantial amount of time to complete."
Any suggestions? I might need to do some major retooling in order to
switch from Cocoa's URL Loading System to CFNetwork Services. Call me
a wimp, slap me around, call me Betty if you like, but CFNetwork
Services scares a little bit. My project timeline would be in a world
of hurt if I need to change a bunch of my code. Any assistance would
be greatly appreciated.
Thank you,
Sean
_______________________________________________
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
_______________________________________________
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