Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.8.0
-
None
Description
In the current abstraction, the Command interface receives InputStream to read the data from the client, which means I pretty much have to allocate a thread to drain this. Look at MINA's own InvertedShellWrapper, which does exactly this.
This is often rather inefficient, especially given that MINA SSHD delivers the data from the client to ChannelSession as callbacks. To fix this, it should allow Command to receive these callbacks. This would allow me to further chain other asynchronous IO (such as socket connection to other servers behind) and implement my Command in a truly asynchronous fashion.