pub enum KrpcQuery {
Ping {
id: Id20,
},
FindNode {
id: Id20,
target: Id20,
want: Option<Vec<WantFamily>>,
},
GetPeers {
id: Id20,
info_hash: Id20,
noseed: Option<i64>,
scrape: Option<i64>,
want: Option<Vec<WantFamily>>,
},
AnnouncePeer {
id: Id20,
info_hash: Id20,
port: u16,
implied_port: bool,
token: Vec<u8>,
},
Get {
id: Id20,
target: Id20,
seq: Option<i64>,
},
Put {
id: Id20,
token: Vec<u8>,
value: Vec<u8>,
key: Option<[u8; 32]>,
signature: Option<[u8; 64]>,
seq: Option<i64>,
salt: Option<Vec<u8>>,
cas: Option<i64>,
},
SampleInfohashes {
id: Id20,
target: Id20,
},
}Expand description
KRPC query types (BEP 5).
Variants§
Ping
Liveness check.
FindNode
Find the closest nodes to a target ID.
Fields
§
want: Option<Vec<WantFamily>>BEP 45: requested address families.
GetPeers
Find peers downloading a torrent.
Fields
§
want: Option<Vec<WantFamily>>BEP 45: requested address families.
AnnouncePeer
Announce that we are downloading a torrent.
Fields
Get
BEP 44: get an item from DHT storage.
Fields
Put
BEP 44: put an item into DHT storage.
Fields
SampleInfohashes
BEP 51: sample info hashes from a node’s storage.
Implementations§
Trait Implementations§
impl Eq for KrpcQuery
impl StructuralPartialEq for KrpcQuery
Auto Trait Implementations§
impl Freeze for KrpcQuery
impl RefUnwindSafe for KrpcQuery
impl Send for KrpcQuery
impl Sync for KrpcQuery
impl Unpin for KrpcQuery
impl UnsafeUnpin for KrpcQuery
impl UnwindSafe for KrpcQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more