increase limits

This commit is contained in:
2024-10-15 22:25:34 -04:00
Unverified
parent c3c6379091
commit 129b32d168
3 changed files with 19 additions and 18 deletions

View File

@@ -93,7 +93,7 @@ async fn main() -> anyhow::Result<()> {
.filter_map(|r| future::ready(r.ok()))
.map(BaseChannel::with_defaults)
// Limit channels to 1 per IP.
.max_channels_per_key(1, |t| t.transport().peer_addr().unwrap().ip())
.max_channels_per_key(2048, |t| t.transport().peer_addr().unwrap().ip())
// serve is generated by the service attribute. It takes as input any type implementing
// the generated World trait.
.map(|channel| {
@@ -101,7 +101,7 @@ async fn main() -> anyhow::Result<()> {
channel.execute(server.serve()).for_each(spawn)
})
// Max 10 channels.
.buffer_unordered(10)
.buffer_unordered(4096)
.for_each(|_| async {})
.await;