views:

222

answers:

2

Have been studying the file system related classes of Adobe AIR 1.5, but so far I've not seen anything that mentions how to interact with stdin/stdout/stderr. Is a bit surprising as AIR makes it possible to otherwise interact with the local file system, and there is a FileStream class.

Am wanting to launch an AIR app from a parent process and then interact with the AIR app via async i/o via stdin/stdout. Would avoid needing to use port on localhost and doing socket i/o. (Yeah, this about bridging java and AIR in cross platform manner ala Merapi style.)

+1  A: 

I don't think this is possible - you will have to use sockets. If you are on windows you could check if something like http://www.northcode.com/ enables you to achieve this.

Simon Groenewolt
A: 

Indeed, I have researched the AIR 1.5 documentation and looks like they have omitted any access to stdin, stdout, stderr file pipes - despite they are available on all the platforms that AIR supports.

I suppose the thinking is that a GUI app doesn't need to bother with something that is usually associated with command line programs. However, for a parent process to communicate bi-directionally with a child process, such pipes would be entirely fine (I've written plenty of perl multi-processing programs that work this way).

The Merapi bridge library implemented via the interprocess pipes of stdin, stdout, stderr would grant to AIR a shade of Microsoft PowerShell ability (which can marshal .NET objects over std interprocess pipes).

RogerV

related questions