Starting to play with alternative DHT implementations
This commit is contained in:
parent
e7c310a1df
commit
7a947ddf79
7 changed files with 232 additions and 8 deletions
11
crates/dht/src/lib.rs
Normal file
11
crates/dht/src/lib.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use bencode::ByteBuf;
|
||||
|
||||
#[tokio::test]
|
||||
async fn it_works() {
|
||||
let data = b"64313a6164323a696432303abd7b477cfbcd10f30b705da20201e7101d8df155363a74617267657432303abd7b477cfbcd10f30b705da20201e7101d8df15565313a71393a66696e645f6e6f6465313a74323a0005313a79313a7165";
|
||||
let data = hex::decode(data).unwrap();
|
||||
dbg!(bencode::dyn_from_bytes::<ByteBuf>(data.as_slice()).unwrap());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue