pub struct Bound { /* private fields */ }Expand description
A listener already bound, the address it holds, and the face its judgement gave it.
The face travels with the listener because it is the verdict about
this very address: a face carried apart from its listener could be
served on a socket it was never judged for. The address is read once,
at bind, because a city asked to serve on :0 holds a port only the
listener knows (wire D16).
Implementations§
Source§impl Bound
impl Bound
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The address the listener holds: the port the operating system
gave when bind was asked for port 0, the one asked for
otherwise. Every reader that hands the city’s address on reads
this one, never the address bind was given.
Sourcepub fn origins(&self) -> &ListenerOrigins
pub fn origins(&self) -> &ListenerOrigins
The names and origins this listener answers to, computed once from
the address it holds (crates/wire/spec/Reception/Entry.lean
§8-94): the URL a person opens, and what the residents’ browser
guard keeps them away from.