mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic_ws_protocol: refactor, moving code into submodules
This commit is contained in:
parent
7c833958d8
commit
71c43aca47
11 changed files with 345 additions and 304 deletions
16
aquatic_ws_protocol/src/response/answer.rs
Normal file
16
aquatic_ws_protocol/src/response/answer.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::common::*;
|
||||
|
||||
/// If announce request has answer = true, send this to peer with
|
||||
/// peer id == "to_peer_id" field
|
||||
/// Action field should be 'announce'
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct MiddlemanAnswerToPeer {
|
||||
pub action: AnnounceAction,
|
||||
/// Note: if equal to client peer_id, client ignores answer
|
||||
pub peer_id: PeerId,
|
||||
pub info_hash: InfoHash,
|
||||
pub answer: JsonValue,
|
||||
pub offer_id: OfferId,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue