Struct salvo_core::conn::tcp::TcpListener
source · pub struct TcpListener<T> { /* private fields */ }
Expand description
TcpListener
is used to create a TCP connection listener.
Implementations§
source§impl<T: ToSocketAddrs + Send> TcpListener<T>
impl<T: ToSocketAddrs + Send> TcpListener<T>
sourcepub fn rustls<S, C, E>(self, config_stream: S) -> RustlsListener<S, C, Self, E>where
S: IntoConfigStream<C> + Send + 'static,
C: TryInto<ServerConfig, Error = E> + Send + 'static,
E: Error + Send,
Available on crate feature rustls
only.
pub fn rustls<S, C, E>(self, config_stream: S) -> RustlsListener<S, C, Self, E>where
S: IntoConfigStream<C> + Send + 'static,
C: TryInto<ServerConfig, Error = E> + Send + 'static,
E: Error + Send,
rustls
only.Creates a new RustlsListener
from current TcpListener
.
sourcepub fn native_tls<S, C, E>(
self,
config_stream: S
) -> NativeTlsListener<S, C, Self, E>
Available on crate feature native-tls
only.
pub fn native_tls<S, C, E>( self, config_stream: S ) -> NativeTlsListener<S, C, Self, E>
native-tls
only.Creates a new NativeTlsListener
from current TcpListener
.
sourcepub fn openssl<S, C, E>(
self,
config_stream: S
) -> OpensslListener<S, C, Self, E>where
S: IntoConfigStream<C> + Send + 'static,
C: TryInto<SslAcceptorBuilder, Error = E> + Send + 'static,
E: Error + Send,
Available on crate feature openssl
only.
pub fn openssl<S, C, E>(
self,
config_stream: S
) -> OpensslListener<S, C, Self, E>where
S: IntoConfigStream<C> + Send + 'static,
C: TryInto<SslAcceptorBuilder, Error = E> + Send + 'static,
E: Error + Send,
openssl
only.Creates a new OpensslListener
from current TcpListener
.
sourcepub fn acme(self) -> AcmeListener<Self>
Available on crate feature acme
only.
pub fn acme(self) -> AcmeListener<Self>
acme
only.Creates a new AcmeListener
from current TcpListener
.
Trait Implementations§
source§impl<T> Listener for TcpListener<T>where
T: ToSocketAddrs + Send,
impl<T> Listener for TcpListener<T>where
T: ToSocketAddrs + Send,
Auto Trait Implementations§
impl<T> Freeze for TcpListener<T>where
T: Freeze,
impl<T> RefUnwindSafe for TcpListener<T>where
T: RefUnwindSafe,
impl<T> Send for TcpListener<T>where
T: Send,
impl<T> Sync for TcpListener<T>where
T: Sync,
impl<T> Unpin for TcpListener<T>where
T: Unpin,
impl<T> UnwindSafe for TcpListener<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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