Re: NSPipe (NSFileHandle) writedata limit?
Re: NSPipe (NSFileHandle) writedata limit?
- Subject: Re: NSPipe (NSFileHandle) writedata limit?
- From: Jens Alfke <email@hidden>
- Date: Mon, 12 Apr 2010 09:24:04 -0700
On Apr 12, 2010, at 9:09 AM, Greg Guerin wrote:
> You must send the notification with size and such BEFORE writing to the pipe. Otherwise the sender can become blocked, because the receiver doesn't know it should be reading anything.
And it seems strange to use a second mechanism (a distributed notification) to tell the receiver that data is available. You don’t really need this — the reader can just wait for the NSStreamEventHasBytesAvailable event and then read the data. Then you can send everything over a single stream.
—Jens_______________________________________________
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