Add into_error
This commit is contained in:
parent
18dc964dc6
commit
938fdd7137
|
|
@ -1254,6 +1254,11 @@ impl<S> MidHandshakeSslStream<S> {
|
||||||
&self.error
|
&self.error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Consumes `self`, returning its error.
|
||||||
|
pub fn into_error(self) -> Error {
|
||||||
|
self.error
|
||||||
|
}
|
||||||
|
|
||||||
/// Restarts the handshake process.
|
/// Restarts the handshake process.
|
||||||
pub fn handshake(mut self) -> Result<SslStream<S>, HandshakeError<S>> {
|
pub fn handshake(mut self) -> Result<SslStream<S>, HandshakeError<S>> {
|
||||||
let ret = unsafe { ffi::SSL_do_handshake(self.stream.ssl.as_ptr()) };
|
let ret = unsafe { ffi::SSL_do_handshake(self.stream.ssl.as_ptr()) };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue