Struct xstack_tls::TlsConn
source · pub struct TlsConn { /* private fields */ }
Expand description
A connection over tls/yamux.
Implementations§
source§impl TlsConn
impl TlsConn
sourcepub async fn connect<S>(
switch: &Switch,
stream: S,
local_addr: Multiaddr,
peer_addr: Multiaddr,
actives: Arc<AtomicUsize>,
) -> Result<Self>
pub async fn connect<S>( switch: &Switch, stream: S, local_addr: Multiaddr, peer_addr: Multiaddr, actives: Arc<AtomicUsize>, ) -> Result<Self>
Create a client-side TlsConn
instance.
pub async fn accept<S>( stream: S, local_addr: Multiaddr, peer_addr: Multiaddr, acceptor: &SslAcceptor, actives: Arc<AtomicUsize>, ) -> Result<Self>
Trait Implementations§
source§impl DriverConnection for TlsConn
impl DriverConnection for TlsConn
source§fn public_key(&self) -> &PublicKey
fn public_key(&self) -> &PublicKey
Return the remote peer’s public key.
source§fn local_addr(&self) -> &Multiaddr
fn local_addr(&self) -> &Multiaddr
Returns the local address that this stream is bound to.
source§fn peer_addr(&self) -> &Multiaddr
fn peer_addr(&self) -> &Multiaddr
Returns the remote address that this stream is connected to.
source§fn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<ProtocolStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<ProtocolStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Accept a new incoming stream with protocol selection.
Auto Trait Implementations§
impl Freeze for TlsConn
impl !RefUnwindSafe for TlsConn
impl Send for TlsConn
impl Sync for TlsConn
impl Unpin for TlsConn
impl !UnwindSafe for TlsConn
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)