aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-06-28 11:30:49 -0700
committerSteven Fackler <[email protected]>2015-06-28 11:30:49 -0700
commit8fdd0e2ec1e0457215cb0550714e0e6024ac6192 (patch)
treeb99b3a60e732471d767f167f03cac2b4ddfd4d11 /openssl/src
parentFix windows build (diff)
downloadrust-openssl-8fdd0e2ec1e0457215cb0550714e0e6024ac6192.tar.xz
rust-openssl-8fdd0e2ec1e0457215cb0550714e0e6024ac6192.zip
More docs
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/ssl/mod.rs16
1 files changed, 16 insertions, 0 deletions
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<S> fmt::Debug for SslStream<S> where S: fmt::Debug {
#[cfg(unix)]
impl<S: Read+Write+::std::os::unix::io::AsRawFd> SslStream<S> {
/// 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<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError> {
let ssl = try!(ssl.into_ssl());
let fd = stream.as_raw_fd() as c_int;
@@ -1028,6 +1032,10 @@ impl<S: Read+Write+::std::os::unix::io::AsRawFd> SslStream<S> {
}
/// 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<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError> {
let ssl = try!(ssl.into_ssl());
let fd = stream.as_raw_fd() as c_int;
@@ -1041,6 +1049,10 @@ impl<S: Read+Write+::std::os::unix::io::AsRawFd> SslStream<S> {
#[cfg(windows)]
impl<S: Read+Write+::std::os::windows::io::AsRawSocket> SslStream<S> {
/// 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<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError> {
let ssl = try!(ssl.into_ssl());
let fd = stream.as_raw_socket() as c_int;
@@ -1051,6 +1063,10 @@ impl<S: Read+Write+::std::os::windows::io::AsRawSocket> SslStream<S> {
}
/// 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<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError> {
let ssl = try!(ssl.into_ssl());
let fd = stream.as_raw_socket() as c_int;