Re: NSURLConnection question
Re: NSURLConnection question
- Subject: Re: NSURLConnection question
- From: "Michael Ash" <email@hidden>
- Date: Sun, 12 Oct 2008 00:24:58 -0400
On Sat, Oct 11, 2008 at 7:07 PM, John Zorko <email@hidden> wrote:
>
> Hello, all ...
>
> I want to alter how often NSURLConnection calls receivedData -- or rather, I
> want it to call it more often (even with fewer bytes) vs less often (with
> loads and loads of bytes). Can I do this with NSURLConnection or some other
> CF class, rather than have to go down to POSIX recv()? Basically, I want to
> be able to specify a max # of bytes to tell me about in one go.
I'd be surprised if it didn't already hand you bytes just as fast as
the system delivers them. Anything else would require internal
buffering and there's simply no reason to do anything of the sort. If
you're asking because you want to react to incoming data faster, I
doubt you can do better than you already have. If you have evidence to
the contrary, it would be interesting to hear. I'd expect to get calls
with a number of bytes roughly equal to the MTU of your connection
path, probably around 1.5kB. Is that not happening for you?
If your motivation is simply that your processing code needs to deal
with smaller units, just divide up the incoming data in your callback
before processing.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden