diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs index 245e401e6847a085087d4750d8d3c1bc4e3264f0..1985dcd0e7407385f6cb21a1f5983e808b342624 100644 --- a/src/ssl/mod.rs +++ b/src/ssl/mod.rs @@ -436,6 +436,15 @@ impl SslStream { SslStream::new_server_from(ssl, stream) } + /// Returns a mutable reference to the underlying stream + /// + /// ## Warning + /// `read`ing or `write`ing directly to the underlying stream will most + /// likely desynchronize the SSL session. + pub fn get_inner(&mut self) -> &mut S { + &mut self.stream + } + fn in_retry_wrapper(&mut self, blk: |&Ssl| -> c_int) -> Result { loop {