• 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: accessing the CFSteam that NSURLConnection is using?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >accessing the CFSteam that NSURLConnection is using? (From: sean <email@hidden>)
 >Re: accessing the CFSteam that NSURLConnection is using? (From: sean <email@hidden>)
 >Re: accessing the CFSteam that NSURLConnection is using? (From: sean <email@hidden>)

  • Prev by Date: Re: Getting copy and paste with custom text attributes to work
  • Next by Date: Re: NSTextView Text Dragging Position
  • Previous by thread: Re: accessing the CFSteam that NSURLConnection is using?
  • Next by thread: NSBezierPath bugs? (Contains point and fill)
  • Index(es):
    • Date
    • Thread