Here is an example of this integration:

https://github.com/jline/jline3/blob/master/remote-ssh/src/main/java/org/jline/builtins/ssh/Ssh.java#L165-L265

For the server side, you can look at:

https://github.com/jline/jline3/blob/master/remote-ssh/src/main/java/org/jline/builtins/ssh/ShellFactoryImpl.java#L119

The invertedIn stream is an OutputStream which you can use to write to the
remote input stream of the ssh channel.  What you write will be the input
on the server side.  It's created when the channel is opened.
If an in channel is set (using setIn) before the channel is opened, a
thread will be created which will read from that InputStream and write the
data to the invertedIn.

You also have the ability to use an async mode where you can use streams
using the IoInputStream and IoOutputStream interfaces.


2017-06-29 11:07 GMT+02:00 Nick Lee <lee1n...@yahoo.ca.invalid>:

> Hello,
> One thing I forgot to mention ....
> The terminal emulator needs an InputStream and an OutputStream.
> I use ChannelShell.getOut() to obtain the OutputStream.
> I use ChannelShell.getInvertedOut() to obtain the InputStream, because
> ChannelShell.getIn() initially returns null and I did not check again later.
> Is that the right way to do it? Should I call getIn() later to obtain an
> InputStream? What is "inverted out" for?
> Thanks,Nick
>



-- 
------------------------
Guillaume Nodet

Reply via email to