mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic ws load test: send offers, count offer responses
This commit is contained in:
parent
6a9e1f5e72
commit
55045279ac
6 changed files with 47 additions and 19 deletions
|
|
@ -57,13 +57,22 @@ fn create_announce_request(
|
|||
|
||||
let info_hash_index = select_info_hash_index(config, &state, rng);
|
||||
|
||||
let mut offers = Vec::with_capacity(10);
|
||||
|
||||
for _ in 0..10 {
|
||||
offers.push(AnnounceRequestOffer {
|
||||
offer_id: OfferId(rng.gen()),
|
||||
offer: JsonValue(::serde_json::Value::from("{}")),
|
||||
})
|
||||
}
|
||||
|
||||
InMessage::AnnounceRequest(AnnounceRequest {
|
||||
info_hash: state.info_hashes[info_hash_index],
|
||||
peer_id: PeerId(rng.gen()),
|
||||
bytes_left: Some(bytes_left),
|
||||
event,
|
||||
numwant: None,
|
||||
offers: None, // FIXME
|
||||
offers: Some(offers),
|
||||
answer: None,
|
||||
to_peer_id: None,
|
||||
offer_id: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue