feat: ✨ rtc peer connection offer
This commit is contained in:
parent
7434d131c4
commit
0aa65f0f60
17 changed files with 389 additions and 59 deletions
26
client/src/signal.rs
Normal file
26
client/src/signal.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
use chrono::DateTime;
|
||||
use leptos::logging::log;
|
||||
use protocol::Signal;
|
||||
use serde_json::json;
|
||||
|
||||
pub async fn start_signalling(username: String, signal_address: String) {
|
||||
log!("Start Signalling");
|
||||
log!("{}\n{}", username, signal_address);
|
||||
let request_client = reqwest::Client::new();
|
||||
let signal = Signal {
|
||||
username,
|
||||
time: DateTime::default(),
|
||||
};
|
||||
let body = json!(signal);
|
||||
match request_client.post(signal_address).json(&body).send().await {
|
||||
Ok(signal_response) => log!("{:#?}", signal_response),
|
||||
Err(err_val) => {
|
||||
log!("Error: Signal Post | {}", err_val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn send_offer() {}
|
||||
pub async fn receive_offer() {}
|
||||
pub async fn send_answer() {}
|
||||
pub async fn receive_answer() {}
|
Loading…
Add table
Add a link
Reference in a new issue