Re: NSFileHandle -availableData breaks stdin stream at 4K chunks?
Re: NSFileHandle -availableData breaks stdin stream at 4K chunks?
- Subject: Re: NSFileHandle -availableData breaks stdin stream at 4K chunks?
- From: Scott Ribe <email@hidden>
- Date: Wed, 02 Jul 2014 20:07:22 -0600
On Jul 2, 2014, at 7:07 PM, Jens Alfke <email@hidden> wrote:
>
> On Jul 2, 2014, at 5:58 PM, Jerry Krinock <email@hidden> wrote:
>
>> What might it be doing at these 4K breaks that causes NSFileHandle’s -availableData to stop?
>
> As they said, the buffer of the pipe has a size of 4kbytes. So there cannot ever be more than 4k of available data at a time, because “available” means “sitting in the buffer ready to be copied out”.
>
> —Jens
Which means, that until you read the 4K in the buffer, the sending side is blocked.
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
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