At 8:52 AM +0100 3/27/12, Quinn \"The Eskimo!\" wrote:
> On 26 Mar 2012, at 21:28, Jens Alfke wrote:
> 
>> What can I do about this? Ideally I'd like the stream to hold off on reading 
>> more from the socket until my code finishes processing the buffer..
> 
> If you don't call -read:maxLength:, the stream won't send you another 
> NSStreamEventHasBytesAvailable event.

BTW, that observation allowed me to fix my code. As Quinn suggested, if I’m 
busy chewing on the data I already read, I just set a flag reminding myself 
that there’s data available instead of reading it right away. That seems to 
make all the flow control/buffering work correctly.

—Jens
_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to