Skip to content

Commit

Permalink
fix connect example
Browse files Browse the repository at this point in the history
  • Loading branch information
neonphog committed May 7, 2024
1 parent e0a4fee commit da344fa
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions crates/tx5-signal/examples/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ async fn main() {

tracing::info!(%sig_url);

/*
let (cli, _rcv) = tx5_signal::Cli::builder()
.with_url(sig_url)
.build()
.await
.expect("expect can build tx5_signal::Cli");
let config = tx5_signal::SignalConfig {
allow_plain_text: true,
..Default::default()
};

println!(
"{}",
serde_json::to_string_pretty(&cli.ice_servers()).expect("expect json")
);
*/
let (con, _recv) = tx5_signal::SignalConnection::connect(
&sig_url,
std::sync::Arc::new(config),
)
.await
.unwrap();

println!("Connected at: {sig_url}/{:?}", con.pub_key());
}

0 comments on commit da344fa

Please sign in to comment.