aquatic_udp: add todo comments

This commit is contained in:
Joakim Frostegård 2021-10-18 23:23:27 +02:00
parent 80754ab4ad
commit f28808b30c
2 changed files with 5 additions and 6 deletions

View file

@ -21,10 +21,11 @@ pub fn run_request_worker(
let mut rng = SmallRng::from_entropy(); let mut rng = SmallRng::from_entropy();
// Need to be cleaned periodically: use timer?
let mut torrents_ipv4 = TorrentMap::<Ipv4Addr>::default(); let mut torrents_ipv4 = TorrentMap::<Ipv4Addr>::default();
let mut torrents_ipv6 = TorrentMap::<Ipv6Addr>::default(); let mut torrents_ipv6 = TorrentMap::<Ipv6Addr>::default();
// Needs to be updated periodically // Needs to be updated periodically: use timer?
let peer_valid_until = ValidUntil::new(config.cleaning.max_peer_age); let peer_valid_until = ValidUntil::new(config.cleaning.max_peer_age);
while let Some((request, addr)) = request_receiver.recv().await { while let Some((request, addr)) = request_receiver.recv().await {

View file

@ -1,9 +1,7 @@
/// TODO /// TODO
/// - move connection checks to socket workers /// - forward announce requests to request workers sharded by info hash (with
/// - ignore scrape requests. forward announce requests to request workers /// some nice algo to make it difficult for an attacker to know which one
/// sharded by info hash (with some nice algo to make it difficult for an /// they get forwarded to)
/// attacker to know which one they get forwarded to). this way, shared
/// state can be avoided.
use std::io::Cursor; use std::io::Cursor;
use std::net::{IpAddr, SocketAddr}; use std::net::{IpAddr, SocketAddr};
use std::rc::Rc; use std::rc::Rc;