Re: How do I show progress with CFStream upload?
Re: How do I show progress with CFStream upload?
- Subject: Re: How do I show progress with CFStream upload?
- From: Chris Griffin <email@hidden>
- Date: Tue, 13 Apr 2004 09:19:31 -0700
Thanks. I set a timer for 100ms and it only gets called after the
transfer is done. The file size is about 131k. My upload speed is about
13K/sec. So it should have plenty of time to fire many times before the
transfer is done. Any ideas?
On Apr 7, 2004, at 7 1:23 PM, Becky Willrich wrote:
I am doing a HTTP POST of a file. The file could be quite large. I
have no choice in doing the POST. I would like to show the upload
(POST) progress. How would I do that?
Periodically query the stream property
kCFStreamPropertyHTTPRequestBytesWrittenCount; this will give you the
number of bytes thusfar written to the server. Only the body bytes
are counted; the HTTP header bytes are not. Unfortunately, there's no
event to let you know when this number has changed; you'll have to
just check from time to time.
Hope that helps,
REW
_______________________________________________
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.