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<S: Stream> 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_inner(&mut self) -> &mut S

Returns a mutable reference to the underlying stream.

Warning

reading or writeing directly to the underlying stream will most likely desynchronize the SSL session.

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 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.

Trait Implementations

impl<S: Stream> Reader for SslStream<S>

fn read(&mut self, buf: &mut [u8]) -> IoResult<usize>

fn read_at_least(&mut self, min: usize, buf: &mut [u8]) -> Result<usize, IoError>

fn read_byte(&mut self) -> Result<u8, IoError>

fn push(&mut self, len: usize, buf: &mut Vec<u8>) -> Result<usize, IoError>

fn push_at_least(&mut self, min: usize, len: usize, buf: &mut Vec<u8>) -> Result<usize, IoError>

fn read_exact(&mut self, len: usize) -> Result<Vec<u8>, IoError>

fn read_to_end(&mut self) -> Result<Vec<u8>, IoError>

fn read_to_string(&mut self) -> Result<String, IoError>

fn read_le_uint_n(&mut self, nbytes: usize) -> Result<u64, IoError>

fn read_le_int_n(&mut self, nbytes: usize) -> Result<i64, IoError>

fn read_be_uint_n(&mut self, nbytes: usize) -> Result<u64, IoError>

fn read_be_int_n(&mut self, nbytes: usize) -> Result<i64, IoError>

fn read_le_uint(&mut self) -> Result<usize, IoError>

fn read_le_int(&mut self) -> Result<isize, IoError>

fn read_be_uint(&mut self) -> Result<usize, IoError>

fn read_be_int(&mut self) -> Result<isize, IoError>

fn read_be_u64(&mut self) -> Result<u64, IoError>

fn read_be_u32(&mut self) -> Result<u32, IoError>

fn read_be_u16(&mut self) -> Result<u16, IoError>

fn read_be_i64(&mut self) -> Result<i64, IoError>

fn read_be_i32(&mut self) -> Result<i32, IoError>

fn read_be_i16(&mut self) -> Result<i16, IoError>

fn read_be_f64(&mut self) -> Result<f64, IoError>

fn read_be_f32(&mut self) -> Result<f32, IoError>

fn read_le_u64(&mut self) -> Result<u64, IoError>

fn read_le_u32(&mut self) -> Result<u32, IoError>

fn read_le_u16(&mut self) -> Result<u16, IoError>

fn read_le_i64(&mut self) -> Result<i64, IoError>

fn read_le_i32(&mut self) -> Result<i32, IoError>

fn read_le_i16(&mut self) -> Result<i16, IoError>

fn read_le_f64(&mut self) -> Result<f64, IoError>

fn read_le_f32(&mut self) -> Result<f32, IoError>

fn read_u8(&mut self) -> Result<u8, IoError>

fn read_i8(&mut self) -> Result<i8, IoError>

impl<S: Stream> Writer for SslStream<S>

fn write(&mut self, buf: &[u8]) -> IoResult<()>

fn flush(&mut self) -> IoResult<()>

fn write_fmt(&mut self, fmt: Arguments) -> Result<(), IoError>

fn write_str(&mut self, s: &str) -> Result<(), IoError>

fn write_line(&mut self, s: &str) -> Result<(), IoError>

fn write_char(&mut self, c: char) -> Result<(), IoError>

fn write_int(&mut self, n: isize) -> Result<(), IoError>

fn write_uint(&mut self, n: usize) -> Result<(), IoError>

fn write_le_uint(&mut self, n: usize) -> Result<(), IoError>

fn write_le_int(&mut self, n: isize) -> Result<(), IoError>

fn write_be_uint(&mut self, n: usize) -> Result<(), IoError>

fn write_be_int(&mut self, n: isize) -> Result<(), IoError>

fn write_be_u64(&mut self, n: u64) -> Result<(), IoError>

fn write_be_u32(&mut self, n: u32) -> Result<(), IoError>

fn write_be_u16(&mut self, n: u16) -> Result<(), IoError>

fn write_be_i64(&mut self, n: i64) -> Result<(), IoError>

fn write_be_i32(&mut self, n: i32) -> Result<(), IoError>

fn write_be_i16(&mut self, n: i16) -> Result<(), IoError>

fn write_be_f64(&mut self, f: f64) -> Result<(), IoError>

fn write_be_f32(&mut self, f: f32) -> Result<(), IoError>

fn write_le_u64(&mut self, n: u64) -> Result<(), IoError>

fn write_le_u32(&mut self, n: u32) -> Result<(), IoError>

fn write_le_u16(&mut self, n: u16) -> Result<(), IoError>

fn write_le_i64(&mut self, n: i64) -> Result<(), IoError>

fn write_le_i32(&mut self, n: i32) -> Result<(), IoError>

fn write_le_i16(&mut self, n: i16) -> Result<(), IoError>

fn write_le_f64(&mut self, f: f64) -> Result<(), IoError>

fn write_le_f32(&mut self, f: f32) -> Result<(), IoError>

fn write_u8(&mut self, n: u8) -> Result<(), IoError>

fn write_i8(&mut self, n: i8) -> Result<(), IoError>

Derived Implementations

impl<S: Clone> Clone for SslStream<S>

fn clone(&self) -> SslStream<S>

fn clone_from(&mut self, source: &Self)