pub struct TlsAccepted<T> { /* private fields */ }
Expand description
Tls Server Accept the Client Hello
and finish the handshake.
Use TlsAccepted::accept()
to receive the Client Hello
.
Then use TlsAccepted::into_stream() to get TlsStream.
Then use TlsStream::flush() to finish the handshake.
Implementations§
Source§impl<T> TlsAccepted<T>
impl<T> TlsAccepted<T>
Sourcepub fn client_hello(&self) -> ClientHello<'_>
pub fn client_hello(&self) -> ClientHello<'_>
Get the ClientHello
received form client.
Sourcepub fn into_stream(
self,
config: Arc<ServerConfig>,
) -> Result<TlsStream<ServerConnection, T>, Error>
pub fn into_stream( self, config: Arc<ServerConfig>, ) -> Result<TlsStream<ServerConnection, T>, Error>
Convert Into TlsStream
with ServerConfig
.
Source§impl<T> TlsAccepted<T>
impl<T> TlsAccepted<T>
Sourcepub async fn accept(stream: T) -> Result<TlsAccepted<T>>
pub async fn accept(stream: T) -> Result<TlsAccepted<T>>
Receive Client Hello
. The stream
generally should implement AsyncRead and AsyncWrite.
Auto Trait Implementations§
impl<T> Freeze for TlsAccepted<T>where
T: Freeze,
impl<T> !RefUnwindSafe for TlsAccepted<T>
impl<T> Send for TlsAccepted<T>where
T: Send,
impl<T> Sync for TlsAccepted<T>where
T: Sync,
impl<T> Unpin for TlsAccepted<T>where
T: Unpin,
impl<T> !UnwindSafe for TlsAccepted<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more