Struct openssl::ssl::SslStream  
            
                [−]
            
        [src]
pub struct SslStream<S> {
    // some fields omitted
}A stream wrapper which handles SSL encryption for an underlying stream.
Methods
impl SslStream<TcpStream>
fn try_clone(&self) -> Result<SslStream<TcpStream>>
Create a new independently owned handle to the underlying socket.
impl<S: Read + Write + AsRawFd> SslStream<S>
fn connect<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError>
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.
fn accept<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError>
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.
impl<S: Read + Write> SslStream<S>
fn connect_generic<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError>
Creates an SSL/TLS client operating over the provided stream.
SslStreams returned by this method will be less efficient than ones
returned by connect, so this method should only be used for streams
that do not implement AsRawFd and AsRawSocket.
fn accept_generic<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError>
Creates an SSL/TLS server operating over the provided stream.
SslStreams returned by this method will be less efficient than ones
returned by accept, so this method should only be used for streams
that do not implement AsRawFd and AsRawSocket.
fn get_ref(&self) -> &S
Returns a reference to the underlying stream.
fn get_mut(&mut self) -> &mut S
Returns a mutable reference to the underlying stream.
Warning
It is inadvisable to read from or write to the underlying stream as it will most likely corrupt the SSL session.
fn ssl(&self) -> &Ssl
Returns the OpenSSL Ssl object associated with this stream.