diff options
Diffstat (limited to 'src/channel.rs')
-rw-r--r-- | src/channel.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/channel.rs b/src/channel.rs index 7086f5d..69b535a 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -5,7 +5,7 @@ use std::io::prelude::*; use std::rc::Rc; use std::slice; -use {raw, Error, SessionInner}; +use {raw, Error, ExtendedData, SessionInner}; /// A channel represents a portion of an SSH connection on which data can be /// read and written. @@ -224,6 +224,14 @@ impl Channel { } } + /// Change how extended data (such as stderr) is handled + pub fn handle_extended_data(&mut self, mode: ExtendedData) -> Result<(), Error> { + unsafe { + let rc = raw::libssh2_channel_handle_extended_data2(self.raw, mode as c_int); + self.sess.rc(rc) + } + } + /// Returns the exit code raised by the process running on the remote host /// at the other end of the named channel. /// |