• 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: Jack Brindle <email@hidden>
  • Date: Tue, 09 Sep 2008 10:26:31 -0700
  • Thread-topic: Write stream proxy

Hi Quinn;

As usual, excellent logic. This is exactly what is going on. There are
actually two cases here. For our non-file transfer posts we create an HTP
message with CFHTTPMessageCreateRequest, add headers, then call
CFReadStreamCreateForHTTPRequest to get the stream. For file transfers we do
the same thing except create the dual socket setup and  call
CFReadStreamCreateForStreamedHTTPRequest on the read stream. However the
read stream looks to be handled as a raw stream of bits, without
http-specific handling. It uses CFWriteStreamWrite to send the data. No
calls are made to anything with the characters HTTP in the name for this
stream. Am I right in the feeling that this really isn't what I need to
have?

At this point I now suspect that a rather interesting rewrite of this
section is in order. It looks like I need to move the code into the
CFHTTP... arena to get the behavior I really need. I am concerned about
Mark's comments about only getting the Socks proxy with the interfaces we
have been using, so if I need to take things quite a bit higher up, please
point out what I should do. I'd much rather do things right than have to
redo the work again.

Thanks. The lights are beginning to come on...

Jack Brindle
YouSendIt, Inc.


On 9/9/08 7:01 AM, "Quinn" <email@hidden> wrote:

> At 17:01 -0700 8/9/08, Mark Pauley wrote:
>> I have no idea how you are doing HTTP with a Socket Read / Write stream pair.
>
> My guess is that Jack is using
> CFReadStreamCreateForStreamedHTTPRequest to do the HTTP and passing
> it a read stream that's connected to a socket pair, with the other
> end of the socket pair connected to his own code that generates the
> data.  This is one of the standard tricks to get around the lack of a
> support for custom async read streams.
>
> Jack, is that right?
>
> S+E

 _______________________________________________
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: Quinn <email@hidden>
References: 
 >Re: Write stream proxy (From: Quinn <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