Federated relay tier: peer flooding, per-member isolation, registry admission and relay discovery

This commit is contained in:
George Coles
2026-09-15 06:49:43 -04:00
parent d30e612be8
commit 2c97fd523f
11 changed files with 759 additions and 177 deletions
+5 -1
View File
@@ -49,7 +49,11 @@ pub async fn spawn_relay() -> String {
pub async fn spawn_relay_with_capacity(capacity: usize) -> String {
let (listener, addr) = relay::bind("127.0.0.1:0").await.unwrap();
tokio::spawn(async move {
let _ = relay::run(listener, capacity).await;
let options = relay::RelayOptions {
capacity,
..Default::default()
};
let _ = relay::run(listener, options).await;
});
format!("http://{addr}")
}