Skip to content

Commit

Permalink
BREAKING: only use sbd messaging as a fallback for webrtc failure (#127)
Browse files Browse the repository at this point in the history
* only use sbd messaging as a fallback for webrtc failure

* webrtc timeout

* remove no longer used signal wire variant

* test fallback connections

* default to libdatachannel

* ignore test on windows

* extra stress time

* wip

* test fix
  • Loading branch information
neonphog authored Feb 13, 2025
1 parent 298119c commit a6a5025
Show file tree
Hide file tree
Showing 13 changed files with 587 additions and 631 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bit_field = "0.10.2"
bytes = "1.4.0"
clap = { version = "4.4.6", features = [ "derive", "wrap_help" ] }
criterion = { version = "0.5.1", features = [ "async_tokio" ] }
datachannel = { version = "0.13.1", default-features = false, features = [ "tracing", "vendored" ] }
datachannel = { version = "0.14.0", default-features = false, features = [ "tracing", "vendored" ] }
dirs = "5.0.0"
dunce = "1.0.3"
futures = "0.3.28"
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ test: static unit
unit:
cargo build --all-targets
RUST_BACKTRACE=1 RUST_LOG=info cargo test -- --nocapture
#--TODO--Once libdatachannel is the default, we'll want to keep
# go-pion tested for a while until we're ready to deprecate it
#RUST_BACKTRACE=1 RUST_LOG=info cargo test --no-default-features --features backend-go-pion --manifest-path crates/tx5-connection/Cargo.toml -- --nocapture
#RUST_BACKTRACE=1 RUST_LOG=info cargo test --no-default-features --features backend-go-pion --manifest-path crates/tx5/Cargo.toml -- --nocapture
# keep go-pion tested for a while until we're ready to deprecate it
RUST_BACKTRACE=1 RUST_LOG=info cargo test --no-default-features --features backend-go-pion --manifest-path crates/tx5-connection/Cargo.toml -- --nocapture
RUST_BACKTRACE=1 RUST_LOG=info cargo test --no-default-features --features backend-go-pion --manifest-path crates/tx5/Cargo.toml -- --nocapture

static: dep fmt lint docs
@if [ "${CI}x" != "x" ]; then git diff --exit-code; fi
Expand Down
2 changes: 1 addition & 1 deletion crates/tx5-connection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories = ["network-programming"]
edition = "2021"

[features]
default = [ "backend-go-pion" ]
default = [ "backend-libdatachannel" ]

# use the libdatachannel crate as the webrtc backend
backend-libdatachannel = [ "dep:datachannel" ]
Expand Down
4 changes: 4 additions & 0 deletions crates/tx5-connection/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ pub struct HubConfig {

/// The signal config to use.
pub signal_config: Arc<tx5_signal::SignalConfig>,

/// Test falling back by failing webrtc setup.
#[cfg(test)]
pub test_fail_webrtc: bool,
}
Loading

0 comments on commit a6a5025

Please sign in to comment.