Federated relay tier: peer flooding, per-member isolation, registry admission and relay discovery
This commit is contained in:
+5
-1
@@ -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}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user