mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +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)]
|
||||
pub struct ResponsePeerListV4(
|
||||
#[serde(
|
||||
|
|
@ -26,7 +26,7 @@ pub struct ResponsePeerListV4(
|
|||
);
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
#[serde(transparent)]
|
||||
pub struct ResponsePeerListV6(
|
||||
#[serde(
|
||||
|
|
@ -51,7 +51,9 @@ pub struct AnnounceResponse {
|
|||
pub announce_interval: usize,
|
||||
pub complete: usize,
|
||||
pub incomplete: usize,
|
||||
#[serde(default)]
|
||||
pub peers: ResponsePeerListV4,
|
||||
#[serde(default)]
|
||||
pub peers6: ResponsePeerListV6,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue