I'm using NSURLConnection to download a web page which is served from a
server that uses HTTP 1.1 and chunked encoding. The web page consists of 2
sections; the server sends the first section which is about 300 bytes
immediately, and has to do some processing for 30 seconds before it sends
the next chunk which is larger (10KB).

I'd like to display the first 300 bytes immediately, but my delegate method
connection::didReceiveData is not called until after the second chunk is
sent by the server (that is 30 seconds later). It appears there is a minimum
buffer size in the NSURLConnection class - it won't give the bytes to me
until it has accumulated that many bytes.I verified this by increasing the
size of the first chunk. If is is 2KB or so, then I get the didReceiveData
call right after the server has sent the first chunk.

I noticed that Safari on Macbook pro has the same behavior. It won't render
the first chunk until after the second one is sent.
Any way to tell NSURLConnection to not buffer and send me bytes immediately?


Arvind
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to