[−][src]Struct openssl::ssl::NonblockingSslStream
Deprecated
Use SslStream
with ssl_read
and ssl_write
.
Methods
impl NonblockingSslStream<TcpStream>
[src]
impl NonblockingSslStream<TcpStream>
pub fn try_clone(&self) -> Result<NonblockingSslStream<TcpStream>>
[src]
pub fn try_clone(&self) -> Result<NonblockingSslStream<TcpStream>>
impl<S> NonblockingSslStream<S>
[src]
impl<S> NonblockingSslStream<S>
pub fn get_ref(&self) -> &S
[src]
pub fn get_ref(&self) -> &S
Returns a reference to the underlying stream.
pub fn get_mut(&mut self) -> &mut S
[src]
pub 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.
pub fn ssl(&self) -> &Ssl
[src]
pub fn ssl(&self) -> &Ssl
Returns a reference to the Ssl.
impl<S: Read + Write> NonblockingSslStream<S>
[src]
impl<S: Read + Write> NonblockingSslStream<S>
pub fn connect<T: IntoSsl>(
ssl: T,
stream: S
) -> Result<NonblockingSslStream<S>, SslError>
[src]
pub fn connect<T: IntoSsl>(
ssl: T,
stream: S
) -> Result<NonblockingSslStream<S>, SslError>
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.
pub fn accept<T: IntoSsl>(
ssl: T,
stream: S
) -> Result<NonblockingSslStream<S>, SslError>
[src]
pub fn accept<T: IntoSsl>(
ssl: T,
stream: S
) -> Result<NonblockingSslStream<S>, SslError>
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.
pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, NonblockingSslError>
[src]
pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, NonblockingSslError>
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.
pub fn write(&mut self, buf: &[u8]) -> Result<usize, NonblockingSslError>
[src]
pub fn write(&mut self, buf: &[u8]) -> Result<usize, NonblockingSslError>
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]
impl<S: Clone + Read + Write> Clone for NonblockingSslStream<S>
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<S: AsRawFd> AsRawFd for NonblockingSslStream<S>
[src]
impl<S: AsRawFd> AsRawFd for NonblockingSslStream<S>
Auto Trait Implementations
impl<S> Send for NonblockingSslStream<S> where
S: Send,
impl<S> Send for NonblockingSslStream<S> where
S: Send,
impl<S> Sync for NonblockingSslStream<S> where
S: Sync,
impl<S> Sync for NonblockingSslStream<S> where
S: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more