mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
aquatic_http: add hand-written ScrapeResponse serialization
This commit is contained in:
parent
17385c92ad
commit
84facea0ca
4 changed files with 94 additions and 26 deletions
|
|
@ -1,9 +1,9 @@
|
|||
use std::collections::BTreeMap;
|
||||
use std::time::Duration;
|
||||
use std::vec::Drain;
|
||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
|
||||
use either::Either;
|
||||
use hashbrown::HashMap;
|
||||
use parking_lot::MutexGuard;
|
||||
use rand::{Rng, SeedableRng, rngs::SmallRng};
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ pub fn handle_scrape_requests(
|
|||
);
|
||||
|
||||
let mut response = ScrapeResponse {
|
||||
files: HashMap::with_capacity(num_to_take),
|
||||
files: BTreeMap::new(),
|
||||
};
|
||||
|
||||
let peer_ip = convert_ipv4_mapped_ipv4(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue