mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
WIP: cleanup aquatic_http_load_test and aquatic_http_protocol
This commit is contained in:
parent
d1e9d24773
commit
da3b2bcd8c
10 changed files with 232 additions and 410 deletions
|
|
@ -1,5 +1,3 @@
|
|||
use std::io::Write;
|
||||
|
||||
use anyhow::Context;
|
||||
use hashbrown::HashMap;
|
||||
use smartstring::{SmartString, LazyCompact};
|
||||
|
|
@ -33,19 +31,19 @@ impl AnnounceRequest {
|
|||
bytes.extend_from_slice(&urlencode_20_bytes(self.peer_id.0));
|
||||
|
||||
bytes.extend_from_slice(b"&port=");
|
||||
itoa::write(&mut bytes, self.port);
|
||||
let _ = itoa::write(&mut bytes, self.port);
|
||||
|
||||
bytes.extend_from_slice(b"&left=");
|
||||
itoa::write(&mut bytes, self.bytes_left);
|
||||
let _ = itoa::write(&mut bytes, self.bytes_left);
|
||||
|
||||
bytes.extend_from_slice(b"&event=started"); // FIXME
|
||||
|
||||
bytes.extend_from_slice(b"&compact=");
|
||||
itoa::write(&mut bytes, self.compact as u8);
|
||||
let _ = itoa::write(&mut bytes, self.compact as u8);
|
||||
|
||||
if let Some(numwant) = self.numwant {
|
||||
bytes.extend_from_slice(b"&numwant=");
|
||||
itoa::write(&mut bytes, numwant);
|
||||
let _ = itoa::write(&mut bytes, numwant);
|
||||
}
|
||||
|
||||
if let Some(ref key) = self.key {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue