Add SslMethod::from_ptr
This commit is contained in:
parent
aaf41e19fa
commit
ebc4c56c34
|
|
@ -100,6 +100,10 @@ impl SslMethod {
|
||||||
SslMethod(compat::dtls_method())
|
SslMethod(compat::dtls_method())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub unsafe fn from_ptr(ptr: *const ffi::SSL_METHOD) -> SslMethod {
|
||||||
|
SslMethod(ptr)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn as_ptr(&self) -> *const ffi::SSL_METHOD {
|
pub fn as_ptr(&self) -> *const ffi::SSL_METHOD {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue