-
-
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 0d3624e
Showing
11 changed files
with
233 additions
and
29 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
Submodule rtc
updated
from 22defe to 5260d3
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,29 @@ | ||
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) = common::setup(config).await?; | ||
|
||
common::connect(host, signal_port, session_id, endpoint_id, &peer_connection).await?; | ||
|
||
common::teardown(peer_connection).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
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(()) | ||
} |