Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Information Request: node_app_socket.js

Hi Johnathan

node_app_socket basically does what you describe -- i.e. acts as a bridge between the client and a running process using socket.io. We use it to implement the existing support for launching Node applications from the Orion shell page. It may be adaptable for your needs.

When you run the command like "node start whatever.js", the server exec()'s a new process to run "whatever.js". node_app_socket is responsible for piping stdout and stderr streams from that new, running process to a socket. Then on the client side (lib/orionode.client/plugins/nodePlugin.js), we send the output received from the socket to the Orion shell where it gets displayed in the command output area.

Of course, since the existing Orion shell doesn't allow commands to take over input handling, node_app_socket currently only works in 1 direction: we have no story for sending stdin from the client to the running process. That's likely something you'll need for a TTY.

Mark


On Sun, Feb 9, 2014 at 2:26 PM, Jonathan Balsano <jrbalsano@xxxxxxxxx> wrote:
Hi everyone,

I'm looking to add a socket connection to the node.js server so that I can connect the client to a server process (basically using socket.io as a pipe). However, I found that we're already using socket.io as part of this node_app_socket.js file, but I'm not quite sure what it's doing. Can someone give me an idea of where I can find out more about this file and what it's doing? Thanks!

Best,
Jonathan

_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev



Back to the top