mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic http protocol: allow non-existing peers in Response
Really, this is to allow missing peers6
This commit is contained in:
parent
fe887e1de5
commit
a18596544f
1 changed files with 4 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ pub struct ResponsePeer<I: Eq>{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||||
#[serde(transparent)]
|
#[serde(transparent)]
|
||||||
pub struct ResponsePeerListV4(
|
pub struct ResponsePeerListV4(
|
||||||
#[serde(
|
#[serde(
|
||||||
|
|
@ -26,7 +26,7 @@ pub struct ResponsePeerListV4(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||||
#[serde(transparent)]
|
#[serde(transparent)]
|
||||||
pub struct ResponsePeerListV6(
|
pub struct ResponsePeerListV6(
|
||||||
#[serde(
|
#[serde(
|
||||||
|
|
@ -51,7 +51,9 @@ pub struct AnnounceResponse {
|
||||||
pub announce_interval: usize,
|
pub announce_interval: usize,
|
||||||
pub complete: usize,
|
pub complete: usize,
|
||||||
pub incomplete: usize,
|
pub incomplete: usize,
|
||||||
|
#[serde(default)]
|
||||||
pub peers: ResponsePeerListV4,
|
pub peers: ResponsePeerListV4,
|
||||||
|
#[serde(default)]
|
||||||
pub peers6: ResponsePeerListV6,
|
pub peers6: ResponsePeerListV6,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue