Allow access to the underlying stream
The use case here is to allow methods like `set_read_timeout` to be called.
This commit is contained in:
parent
f71555e820
commit
a7a9ef7eaa
|
|
@ -436,6 +436,15 @@ impl<S: Stream> SslStream<S> {
|
|||
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<c_int, SslError> {
|
||||
loop {
|
||||
|
|
|
|||
Loading…
Reference in New Issue