Re: accessing the CFSteam that NSURLConnection is using?
Re: accessing the CFSteam that NSURLConnection is using?
- Subject: Re: accessing the CFSteam that NSURLConnection is using?
- From: sean <email@hidden>
- Date: Thu, 13 Oct 2005 16:57:59 -0700
Can anybody offer some sample code showing how to provide a full
implementation for the overridden methods read:maxLength: and
getBuffer:length: The notification code isn't an issue, but I'm not
sure what the implementation should do with buffer, length, read, and
maxlength values?
Initially, I tried forwarding these calls to the initializing
NSInputStream object of my 'PostingStream' object, but this didn't
work for me... But, I'm not that surprised because the docs say that I
need to provide full implementations of these methods.
On 10/12/05, sean <email@hidden> wrote:
> Great! This looks like exactly what I need.
>
> Is there a swoopty way of forward all of the messages that
> PostingStream receives to the initializing NSInputStream? Or should I
> override all of NSStream's methods to do this?
>
> > - create an NSInputStream subclass (let's call it PostingStream) that
> > initializes from another NSInputStream and passes all messages from
> > itself to the other stream. Override the methods read:maxLength: and
> > getBuffer:length: so that they perform the read on the other stream,
> > then somehow notify your code of how many bytes were read.
> > - create a PostingStream from the stream for the post body
> > - set the PostingStream as the HTTPBodyStream on the outgoing request
>
_______________________________________________
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