pub struct TlsListener {
inner: TcpListener,
layer: TlsLayer,
}Expand description
TLS listener. Wraps a TCP listener with TLS acceptance.
Fields§
§inner: TcpListener§layer: TlsLayerImplementations§
Source§impl TlsListener
impl TlsListener
Sourcepub fn new(inner: TcpListener, config: ServerTlsConfig) -> Self
pub fn new(inner: TcpListener, config: ServerTlsConfig) -> Self
Create a TLS listener from a TCP listener and TLS config.
Sourcepub async fn accept(&self) -> Result<Box<dyn ByteStream>>
pub async fn accept(&self) -> Result<Box<dyn ByteStream>>
Accept a new TLS connection.
Sourcepub fn local_endpoint(&self) -> Result<Endpoint>
pub fn local_endpoint(&self) -> Result<Endpoint>
Local endpoint this listener is bound to.
Auto Trait Implementations§
impl Freeze for TlsListener
impl !RefUnwindSafe for TlsListener
impl Send for TlsListener
impl Sync for TlsListener
impl Unpin for TlsListener
impl UnsafeUnpin for TlsListener
impl !UnwindSafe for TlsListener
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