File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " libssh-rs"
3- version = " 0.3.5 "
3+ version = " 0.3.6 "
44edition = " 2018"
55repository = " https://github.com/wez/libssh-rs"
66description = " Bindings to the libssh library"
Original file line number Diff line number Diff line change @@ -1169,6 +1169,21 @@ impl Session {
11691169 sftp. init ( ) ?;
11701170 Ok ( sftp)
11711171 }
1172+
1173+ /// Send a message that should be ignored by the peer
1174+ pub fn send_ignore ( & self , data : & [ u8 ] ) -> SshResult < ( ) > {
1175+ let sess = self . lock_session ( ) ;
1176+ let status = unsafe { sys:: ssh_send_ignore ( * * sess, data. as_ptr ( ) as _ ) } ;
1177+ if status != sys:: SSH_OK as i32 {
1178+ if let Some ( err) = sess. last_error ( ) {
1179+ Err ( err)
1180+ } else {
1181+ Err ( Error :: TryAgain )
1182+ }
1183+ } else {
1184+ Ok ( ( ) )
1185+ }
1186+ }
11721187}
11731188
11741189#[ cfg( unix) ]
You can’t perform that action at this time.
0 commit comments