Struct openssl::ssl::NonblockingSslStream [] [src]

pub struct NonblockingSslStream<S>(_);

Deprecated

Use SslStream with ssl_read and ssl_write.

Methods

impl NonblockingSslStream<TcpStream>
[src]

impl<S> NonblockingSslStream<S>
[src]

Returns a reference to the underlying stream.

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.

Returns a reference to the Ssl.

impl<S: Read + Write> NonblockingSslStream<S>
[src]

Create a new nonblocking client ssl connection on wrapped stream.

Note that this method will most likely not actually complete the SSL handshake because doing so requires several round trips; the handshake will be completed in subsequent read/write calls managed by your event loop.

Create a new nonblocking server ssl connection on wrapped stream.

Note that this method will most likely not actually complete the SSL handshake because doing so requires several round trips; the handshake will be completed in subsequent read/write calls managed by your event loop.

Read bytes from the SSL stream into buf.

Given the SSL state machine, this method may return either WantWrite or WantRead to indicate that your event loop should respectively wait for write or read readiness on the underlying stream. Upon readiness, repeat your read() call with the same arguments each time until you receive an Ok(count).

An SslError return value, is terminal; do not re-attempt your read.

As expected of a nonblocking API, this method will never block your thread on I/O.

On a return value of Ok(count), count is the number of decrypted plaintext bytes copied into the buf slice.

Write bytes from buf to the SSL stream.

Given the SSL state machine, this method may return either WantWrite or WantRead to indicate that your event loop should respectively wait for write or read readiness on the underlying stream. Upon readiness, repeat your write() call with the same arguments each time until you receive an Ok(count).

An SslError return value, is terminal; do not re-attempt your write.

As expected of a nonblocking API, this method will never block your thread on I/O.

Given a return value of Ok(count), count is the number of plaintext bytes from the buf slice that were encrypted and written onto the stream.

Trait Implementations

impl<S: Clone + Read + Write> Clone for NonblockingSslStream<S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: AsRawFd> AsRawFd for NonblockingSslStream<S>
[src]

Extracts the raw file descriptor. Read more