Struct telos::TlsStream [] [src]

pub struct TlsStream<T> {
    // some fields omitted
}

Methods

impl<T> TlsStream<T>

fn handshake(&mut self) -> TlsResult<()>

Executes the TLS handshake. This function is automatically called when reading or writing, you usually don't need to call it unless you want to force the handshake to finish sooner.

Calling handshake multiple times, if the other end of the connection is not expecting it will usually result in an error.

fn shutdown(&mut self) -> Result<()>

Close TLS connection. This will not close the underlying transport.

fn certificate_issuer(&self) -> String

Calling this method before the handshake is complete causes this method to return an empty string. See handshake().

fn certificate_hash(&self) -> String

Calling this method before the handshake is complete causes this method to return an empty string. See handshake().

fn certificate_subject(&self) -> String

Calling this method before the handshake is complete causes this method to return an empty string. See handshake().

fn peer_cert_provided(&self) -> bool

fn peer_cert_notbefore(&self) -> TlsResult<DateTime<UTC>>

fn peer_cert_notafter(&self) -> TlsResult<DateTime<UTC>>

fn peer_cert_contains_name(&self, name: &str) -> bool

fn version(&self) -> String

Calling this method before the handshake is complete causes this method to return an empty string. See handshake().

fn cipher(&self) -> String

Calling this method before the handshake is complete causes this method to return an empty string. See handshake().

fn inner(&self) -> &T

Returns a reference to the inner object holding the socket.

fn inner_mut(&mut self) -> &mut T

If available returns a mutable reference to the inner object holding the socket.

Trait Implementations

impl<T> Read for TlsStream<T>

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

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

fn by_ref(&mut self) -> &mut Self

fn bytes(self) -> Bytes<Self>

fn chars(self) -> Chars<Self>

fn chain<R>(self, next: R) -> Chain<Self, R> where R: Read

fn take(self, limit: u64) -> Take<Self>

fn tee<W>(self, out: W) -> Tee<Self, W> where W: Write

impl<T> Write for TlsStream<T>

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

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

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

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

fn by_ref(&mut self) -> &mut Self

fn broadcast<W>(self, other: W) -> Broadcast<Self, W> where W: Write

impl<T> Drop for TlsStream<T>

fn drop(&mut self)