Re: CFReadStreamCopyProperty() returns NULL?
Re: CFReadStreamCopyProperty() returns NULL?
- Subject: Re: CFReadStreamCopyProperty() returns NULL?
- From: Frederick Cheung <email@hidden>
- Date: Mon, 9 Feb 2009 10:20:13 +0000
On 8 Feb 2009, at 20:36, John Michael Zorko wrote:
The platform is iPhone OS 2.2.1, if that helps. The Apple
documentation for CFReadStreamCopyProperty() doesn't say anything
about why it might return NULL. Furthermore, if I comment out the
code trying to get the response, the rest of the code works and I
get the data from the URL. What am I doing wrong?
Sounds like you're calling CFReadStreamCopyProperty too early - You
can only copy the kCFStreamPropertyHTTPResponseHeader once it has
actually received the bytes comprising the header. (calling
CFReadStreamRead as I'm guessing you do later just blocks until there
is data available)
Fred
_______________________________________________
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