Struct salvo::prelude::UnixListener
source · pub struct UnixListener { /* private fields */ }
Expand description
Unix domain socket listener.
Implementations§
source§impl UnixListener
impl UnixListener
sourcepub fn bind(path: impl AsRef<Path>) -> UnixListener
pub fn bind(path: impl AsRef<Path>) -> UnixListener
Creates a new UnixListener
bind to the specified path.
sourcepub fn try_bind(path: impl AsRef<Path>) -> Result<UnixListener, Error>
pub fn try_bind(path: impl AsRef<Path>) -> Result<UnixListener, Error>
Creates a new UnixListener
bind to the specified path.
Panics
This function panics if thread-local runtime is not set.
The runtime is usually set implicitly when this function is called from a future driven by a tokio runtime.
Trait Implementations§
source§impl Accept for UnixListener
impl Accept for UnixListener
§type Conn = UnixStream
type Conn = UnixStream
The connection type that can be accepted.
source§fn poll_accept(
self: Pin<&mut UnixListener>,
cx: &mut Context<'_>
) -> Poll<Option<Result<<UnixListener as Accept>::Conn, <UnixListener as Accept>::Error>>>
fn poll_accept(
self: Pin<&mut UnixListener>,
cx: &mut Context<'_>
) -> Poll<Option<Result<<UnixListener as Accept>::Conn, <UnixListener as Accept>::Error>>>
Poll to accept the next connection.
source§impl Listener for UnixListener
impl Listener for UnixListener
source§fn join<T>(self, other: T) -> JoinedListener<Self, T>where
Self: Sized,
fn join<T>(self, other: T) -> JoinedListener<Self, T>where
Self: Sized,
Join current Listener with the other.