Open faceyspacey opened 9 years ago
@faceyspacey I believe you wish to add a function to the stdout
handler.
The best way to do that would be to pass an object to stdout
with a function property with the name of write
.
Something like this :
`var connection_options = {
port: 22,
username: 'sample_user',
password: 'sample_password',
stdout: {
write : function(stream){
let data = stream.toString('utf8');
console.log(data);
}
}
};
`
Hope this helps.
Cheers, Ashish Deshpande
would I do something like this to respond to each output line: