Skip to main content
function UnixListener.accept
def UnixListener.accept(
*,
timeout_ms: None | int = None
) -> (std.net.UnixStream, None | str)
Wait for a connection and return (stream, peer_path), the path being None for an unnamed client socket, as it usually is. With timeout_ms, fail with kind == "timed_out" when none arrives in time; None waits for as long as it takes. function UnixListener.close
def UnixListener.close() -> None
Stop listening. The socket file stays where it is; remove it when it is no longer needed. Closing twice is harmless. function UnixListener.local_addr
def UnixListener.local_addr() -> None | str
The path this listener is bound to. function UnixListener.try_accept
def UnixListener.try_accept(
*,
timeout_ms: None | int = None
) -> (None | std.io.Error, None | (std.net.UnixStream, None | str))
accept, returning an (err, (stream, peer_path)) pair instead of raising a std.io.Error. function UnixListener.try_local_addr
def UnixListener.try_local_addr() -> (None | std.io.Error, None | str)
local_addr, returning an (err, str | None) pair instead of raising a std.io.Error.