mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic_udp: glommio: return scrape stats in correct order
This commit is contained in:
parent
0e58347ac4
commit
821608ab50
6 changed files with 108 additions and 59 deletions
|
|
@ -10,20 +10,28 @@ use crate::common::*;
|
|||
#[derive(Debug)]
|
||||
pub enum ConnectedRequest {
|
||||
Announce(AnnounceRequest),
|
||||
Scrape(ScrapeRequest),
|
||||
Scrape {
|
||||
request: ScrapeRequest,
|
||||
/// Currently only used by glommio implementation
|
||||
original_indices: Vec<usize>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ConnectedResponse {
|
||||
Announce(AnnounceResponse),
|
||||
Scrape(ScrapeResponse),
|
||||
Scrape {
|
||||
response: ScrapeResponse,
|
||||
/// Currently only used by glommio implementation
|
||||
original_indices: Vec<usize>,
|
||||
},
|
||||
}
|
||||
|
||||
impl Into<Response> for ConnectedResponse {
|
||||
fn into(self) -> Response {
|
||||
match self {
|
||||
Self::Announce(response) => Response::Announce(response),
|
||||
Self::Scrape(response) => Response::Scrape(response),
|
||||
Self::Scrape { response, .. } => Response::Scrape(response),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue