pub struct Listener { /* private fields */ }Expand description
Where a WaOS accepts cargo waos’s connections. Dropping it removes its socket file, so a
WaOS that quit leaves none; one that died leaves a file the next WaOS replaces.
Implementations§
Source§impl Listener
impl Listener
Sourcepub async fn bind(path: &Path) -> Result<Listener>
pub async fn bind(path: &Path) -> Result<Listener>
Listens at path, making its folder for the user alone. A socket file left there by a
WaOS that died is replaced; while another WaOS answers on it, this one is refused with
AddrInUse.
Sourcepub async fn accept(&self) -> Result<Connection<UnixStream>>
pub async fn accept(&self) -> Result<Connection<UnixStream>>
The next connection: one run.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Listener
impl Forget 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<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