I'm trying to figure out how to work with **communicationsPipe provided by AEWP. I figured out how to send data to of from the called process by creating an NSFileHandle:

NSFileHandle *helperInputHandle = [[NSFileHandle alloc] initWithFileDescriptor:fileno(rawPipe) closeOnDealloc:YES]
// Write some data
[helperInputHandle dealloc]

And on the other end I can do the same and just readDataToEndOfFile:

NSFileHandle *stdinHandle = [NSFileHandle fileHandleWithStandardInput];
NSData *stdinData = [stdinHandle readDataToEndOfFile];

But I can't figure out how to go both ways. There's only one handle, so once I close it I can forget about reading any data that comes back. Anyone done this before? Suggestions?
_______________________________________________

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

Reply via email to