• 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: CFReadStreamCopyProperty() returns NULL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CFReadStreamCopyProperty() returns NULL?
      • From: John Michael Zorko <email@hidden>
References: 
 >CFReadStreamCopyProperty() returns NULL? (From: John Michael Zorko <email@hidden>)

  • Prev by Date: When is it safe to enable filtering in an NKE?
  • Next by Date: broadcast address of a network interface
  • Previous by thread: Re: CFReadStreamCopyProperty() returns NULL?
  • Next by thread: Re: CFReadStreamCopyProperty() returns NULL?
  • Index(es):
    • Date
    • Thread