1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// Copyright (c) 2026 2youg1 and the sprawling contributors
//! The addresses this city listens on, registered by its listeners and
//! read by both browser tools before they act
//! (`crates/sprawling/spec/BrowserBidi.lean` ยง8-45-6, sprawling D74).
//!
//! The tools are built per run through a function pointer that carries no
//! state of the assembly, and the remote listener opens and closes while
//! the city runs, so the register is the process's: a listener adds its
//! address when it is bound and takes it back when it is dropped.
use SocketAddr;
use Mutex;
use OwnListeners;
/// Every address registered and not yet taken back, once per registration.
static LISTENING: = new;
/// One listener's place in the register; dropping it takes the address
/// back.
pub ;
/// Registers `at` as one of this city's listeners until the returned
/// value is dropped.
///
/// A register left locked by a dead thread is taken over here and in
/// [`own`], because the list is whole after any push or removal; refusing
/// instead would turn one dead thread into a guard that lets everything
/// through or a browser that refuses everything.
pub
/// The listeners registered at this moment.
pub