pub struct UnixListener(/* private fields */);
Implementations§
Source§impl UnixListener
impl UnixListener
Sourcepub fn bind(path: &UnixStr, blocking: bool) -> Result<Self>
pub fn bind(path: &UnixStr, blocking: bool) -> Result<Self>
Creates and binds a non-blocking UnixListener
at the specified path
Use the blocking
variable to set as blocking or non-blocking
§Errors
Various OS errors relating to permissions, and missing paths
Sourcepub fn accept(&self, blocking: bool) -> Result<UnixStream>
pub fn accept(&self, blocking: bool) -> Result<UnixStream>
Accepts a new connection, blocking if this UnixListener
was previously set to be blocking
Use the blocking
variable to set the incoming UnixStream
as blocking or non-blocking
§Errors
Various OS errors relating to socket communication
EAGAIN
if this listener is set to non-blocking and there are no ready connections
Auto Trait Implementations§
impl Freeze for UnixListener
impl RefUnwindSafe for UnixListener
impl Send for UnixListener
impl Sync for UnixListener
impl Unpin for UnixListener
impl UnwindSafe for UnixListener
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