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> SslStream<S>
fn new_server_from(ssl: Ssl, stream: S) -> Result<SslStream<S>, SslError>
+fn new_from(ssl: Ssl, stream: S) -> Result<SslStream<S>, SslError>
+Attempts to create a new SSL stream from a given Ssl
instance.
fn new(ctx: &SslContext, stream: S) -> Result<SslStream<S>, SslError>
+Creates a new SSL stream
+fn new_server(ctx: &SslContext, stream: S) -> Result<SslStream<S>, SslError>
+Creates a new SSL server stream
+fn get_ref(&self) -> &S
+Returns a reference to the underlying stream.
+fn get_peer_certificate(&self) -> Option<X509>
+Return the certificate of the peer
+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 desynchronize the SSL session.
+fn get_compression(&self) -> Option<String>
+Get the compression currently in use. The result will be +either None, indicating no compression is in use, or a string +with the compression name.
+fn pending(&self) -> usize
+pending() takes into account only bytes from the TLS/SSL record that is currently being processed (if any).
+