rustfmt & signal_client improvememts

- handle ping message
- recv now only returns on SignalResponse
This commit is contained in:
Théo Monnom
2022-10-03 15:59:43 +02:00
parent 2213a70142
commit d64c7e5e08
35 changed files with 1584 additions and 174 deletions
+1347
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
[workspace]
members = ["*"]
exclude = ["target"]
+10
View File
@@ -0,0 +1,10 @@
[package]
name = "simple_room"
version = "0.1.0"
edition = "2021"
[dependencies]
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
tracing-subscriber = "0.3"
livekit = { path = "../.." }
+19
View File
@@ -0,0 +1,19 @@
use livekit::proto::data_packet;
use livekit::room;
const URL: &str = "ws://localhost:7880";
const TOKEN : &str = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjgxMzc0NDgsImlzcyI6IkFQSXpLYkFTaUNWYWtnSiIsIm5hbWUiOiJ3ZWIiLCJuYmYiOjE2NjQ1Mzc0NDgsInN1YiI6IndlYiIsInZpZGVvIjp7InJvb21DcmVhdGUiOnRydWUsInJvb21Kb2luIjp0cnVlfX0.6VMDdXJYrW3KWrEzxx4hzbmMQnjQIRILQ48Qrbx5j44";
// eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjgxMzc0NDgsImlzcyI6IkFQSXpLYkFTaUNWYWtnSiIsIm5hbWUiOiJ3ZWIiLCJuYmYiOjE2NjQ1Mzc0NDgsInN1YiI6IndlYiIsInZpZGVvIjp7InJvb21DcmVhdGUiOnRydWUsInJvb21Kb2luIjp0cnVlfX0.6VMDdXJYrW3KWrEzxx4hzbmMQnjQIRILQ48Qrbx5j44
#[tokio::main]
async fn main() -> Result<(), room::RoomError> {
tracing_subscriber::fmt::init();
let mut room = room::connect(URL, TOKEN).await?;
room.local_participant()
.publish_data(b"this is a test", data_packet::Kind::Reliable)
.await?;
Ok(())
}