Add examples
This commit is contained in:
parent
adb98a2d89
commit
2ebbc0a828
9 changed files with 541 additions and 30 deletions
|
|
@ -35,3 +35,4 @@ clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", v
|
|||
librqbit-core = {path="../librqbit_core", version = "2.2.1"}
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
|
@ -8,6 +8,8 @@ use tracing::info;
|
|||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let info_hash = Id20::from_str("64a980abe6e448226bb930ba061592e44c3781a1").unwrap();
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let dht = Dht::new().await.context("error initializing DHT")?;
|
||||
let mut stream = dht.get_peers(info_hash).await?;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue