http://www.perlmonks.org?node_id=1081110


in reply to SSH2 - Asynchronous Opens & Synchronous Commands

The parent/childs solution seems elegant and interesting. A child for each device, opening the ssh connection and then receiving instructions and sending results through an IPC message queue. You could parse the commands' output in the childs' code and use a simple protocol to communicate with the parent.
  • Comment on Re: SSH2 - Asynchronous Opens & Synchronous Commands

Replies are listed 'Best First'.
Re^2: SSH2 - Asynchronous Opens & Synchronous Commands
by 5haun (Scribe) on Apr 04, 2014 at 11:54 UTC

    We may end up having to do something like that, but the requirement is for the output parsing to be done by the caller:

    caller test script => framework library => ssh module => remote shell => remote command => output => ssh module => framework library => caller test script

    Thanks for the input.