From 8fdd0e2ec1e0457215cb0550714e0e6024ac6192 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 28 Jun 2015 11:30:49 -0700 Subject: [PATCH] More docs --- openssl/src/ssl/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 6d4b1f81..2163891d 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -1018,6 +1018,10 @@ impl fmt::Debug for SslStream where S: fmt::Debug { #[cfg(unix)] impl SslStream { /// Creates an SSL/TLS client operating over the provided stream. + /// + /// Streams passed to this method must implement `AsRawFd` on Unixy + /// platforms and `AsRawSocket` on Windows. Use `connect_generic` for + /// streams that do not. pub fn connect(ssl: T, stream: S) -> Result, SslError> { let ssl = try!(ssl.into_ssl()); let fd = stream.as_raw_fd() as c_int; @@ -1028,6 +1032,10 @@ impl SslStream { } /// Creates an SSL/TLS server operating over the provided stream. + /// + /// Streams passed to this method must implement `AsRawFd` on Unixy + /// platforms and `AsRawSocket` on Windows. Use `accept_generic` for + /// streams that do not. pub fn accept(ssl: T, stream: S) -> Result, SslError> { let ssl = try!(ssl.into_ssl()); let fd = stream.as_raw_fd() as c_int; @@ -1041,6 +1049,10 @@ impl SslStream { #[cfg(windows)] impl SslStream { /// Creates an SSL/TLS client operating over the provided stream. + /// + /// Streams passed to this method must implement `AsRawFd` on Unixy + /// platforms and `AsRawSocket` on Windows. Use `connect_generic` for + /// streams that do not. pub fn connect(ssl: T, stream: S) -> Result, SslError> { let ssl = try!(ssl.into_ssl()); let fd = stream.as_raw_socket() as c_int; @@ -1051,6 +1063,10 @@ impl SslStream { } /// Creates an SSL/TLS server operating over the provided stream. + /// + /// Streams passed to this method must implement `AsRawFd` on Unixy + /// platforms and `AsRawSocket` on Windows. Use `accept_generic` for + /// streams that do not. pub fn accept(ssl: T, stream: S) -> Result, SslError> { let ssl = try!(ssl.into_ssl()); let fd = stream.as_raw_socket() as c_int;