pub struct Listener { /* private fields */ }Expand description
Listens for incoming qmux connections on a Unix domain socket.
Each accepted connection yields the session plus the peer’s PeerCred, so
the caller can enforce a uid/gid/pid allowlist. The socket file is removed on
drop.
Implementations§
Source§impl Listener
impl Listener
Sourcepub async fn bind(path: impl AsRef<Path>) -> Result<Self, Error>
pub async fn bind(path: impl AsRef<Path>) -> Result<Self, Error>
Bind a Unix socket at path, replacing a stale socket file left by a
previous run.
Refuses to unlink the path if it exists and is not a socket, to avoid clobbering an unrelated file.
Sourcepub fn with_protocols<I, S>(self, protocols: I) -> Self
pub fn with_protocols<I, S>(self, protocols: I) -> Self
Advertise these application protocols (moq ALPNs) for in-band negotiation, in preference order. The first server entry the client also offers wins.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Listener
impl RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin for Listener
impl UnsafeUnpin for Listener
impl UnwindSafe for Listener
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