• 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: Write stream proxy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Write stream proxy


  • Subject: Re: Write stream proxy
  • From: "Philip D. Wasson" <email@hidden>
  • Date: Fri, 19 Sep 2008 16:47:29 -0400


On Sep 19, 2008, at 16:22, Jack Brindle wrote:

When creating a new stream from the same http message, do we need to
recreate the read and write streams that are combined into the
CFReadStreamCreateForStreamedHTTPRequest? In other words, when the output
stream from the CFReadStreamCreateForStreamedHTTPRequest is released during
the process, are the read and write streams I am using also released?


I suspect the answer is yes, and this one step is what is keeping my code
from working.


I now believe that when creating the new stream during the authentication
process I will need to also create the paired read and write streams, then
feed the new ones to the CFReadStreamCreateForStreamedHTTPRequest.

Even though the docs in Xcode (2.5) don't appear to explicitly say so, I believe my previous investigations revealed that CFReadStreamCreateForStreamedHTTPRequest retains the read stream you give it for the requestBody (which is why I showed releasing that stream immediately after calling CFReadStreamCreateForStreamedHTTPRequest. So once you close the reply read stream, or perhaps even sooner, it will release the request body read stream. It doesn't have a reference to the write stream, so you must release that yourself.


So yes, you should re-create the stream pair used to read the file and supply it to CFReadStreamCreateForStreamedHTTPRequest.

----------------------------------------
Philip D. Wasson
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
  • Follow-Ups:
    • Re: Write stream proxy
      • From: Mark Pauley <email@hidden>
References: 
 >Re: Write stream proxy (From: Jack Brindle <email@hidden>)

  • Prev by Date: Re: Write stream proxy
  • Next by Date: Re: Write stream proxy
  • Previous by thread: Re: Write stream proxy
  • Next by thread: Re: Write stream proxy
  • Index(es):
    • Date
    • Thread