On Jan 12, 2010, at 12:46 PM, Heizer, Charles wrote: > I'm hoping someone can help me out here. I'm trying to use IPC (Unix domain > socket AF_UNIX) to pass data between two applications. > > I have a console application which is sending data to the socket path and a > Cocoa GUI app which is reading it using NSFileHandle. The problem I'm seeing > is on 10.5 systems I'm not getting all of the data. I'm only getting 502 > characters, but on 10.6 i'm getting the whole thing. > > Is there some kind of buffer size I can adjust, I'm not really sure what to > do?
You don't say what methods of NSFileHandle you're using to read the data. In particular, some of the asynchronous methods require that you re-issue the request to keep reading. For example, -readInBackgroundAndNotify will post an NSFileHandleReadCompletionNotification notification when it reads _some_ data. In your handler for that notification, you must repeat the -readInBackgroundAndNotify invocation to read more data. You will know you've read to end-of-file (or closing of a communications channel) when you receive an empty data object in that notification. Regards, Ken _______________________________________________ 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 arch...@mail-archive.com