-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yngrtc
committed
Feb 17, 2024
1 parent
ae25e2a
commit 66a2bbe
Showing
13 changed files
with
258 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule rtc
updated
2 files
+1 −1 | sctp/src/association/association_test.rs | |
+2 −2 | sdp/src/description/session.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,48 @@ | ||
use log::error; | ||
use rand::random; | ||
use sfu::SessionId; | ||
use webrtc::ice_transport::ice_server::RTCIceServer; | ||
use webrtc::peer_connection::configuration::RTCConfiguration; | ||
|
||
// importing common module. | ||
mod common; | ||
|
||
#[test] | ||
fn test_datachannel() -> anyhow::Result<()> { | ||
// using common code. | ||
common::setup()?; | ||
#[tokio::test] | ||
async fn test_datachannel() -> anyhow::Result<()> { | ||
// Prepare the configuration | ||
let config = RTCConfiguration { | ||
ice_servers: vec![RTCIceServer { | ||
urls: vec!["stun:stun.l.google.com:19302".to_owned()], | ||
..Default::default() | ||
}], | ||
..Default::default() | ||
}; | ||
let host = "127.0.0.1".to_string(); | ||
let signal_port = 8080u16; | ||
let session_id: SessionId = random::<u64>(); | ||
|
||
let (peer_connection, endpoint_id) = match common::setup(config).await { | ||
Ok(ok) => ok, | ||
Err(err) => { | ||
error!("error: {}", err); | ||
return Err(err.into()); | ||
} | ||
}; | ||
|
||
match common::connect(host, signal_port, session_id, endpoint_id, &peer_connection).await { | ||
Ok(ok) => ok, | ||
Err(err) => { | ||
error!("error: {}", err); | ||
return Err(err.into()); | ||
} | ||
}; | ||
|
||
match common::teardown(peer_connection).await { | ||
Ok(ok) => ok, | ||
Err(err) => { | ||
error!("error: {}", err); | ||
return Err(err.into()); | ||
} | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// importing common module. | ||
mod common; | ||
|
||
#[test] | ||
fn test_rtp() -> anyhow::Result<()> { | ||
// using common code. | ||
common::setup()?; | ||
#[tokio::test] | ||
async fn test_rtp() -> anyhow::Result<()> { | ||
/*let (pc, _done_rx) = common::setup().await?; | ||
common::teardown(pc).await?;*/ | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// importing common module. | ||
mod common; | ||
|
||
#[test] | ||
fn test_signaling() -> anyhow::Result<()> { | ||
// using common code. | ||
common::setup()?; | ||
#[tokio::test] | ||
async fn test_signaling() -> anyhow::Result<()> { | ||
/*let (pc, _done_rx) = common::setup().await?; | ||
common::teardown(pc).await?;*/ | ||
Ok(()) | ||
} |