Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
neonphog committed May 1, 2024
1 parent ebfa912 commit 3c3b6ae
Show file tree
Hide file tree
Showing 6 changed files with 721 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions crates/tx5/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ backend-webrtc-rs = [ "tx5-connection/backend-webrtc-rs" ]
[dependencies]
base64 = { workspace = true }
tokio = { workspace = true, features = [ "full" ] }
tracing = { workspace = true }
tx5-connection = { workspace = true, default-features = false }
tx5-core = { workspace = true }
url = { workspace = true }

[dev-dependencies]
sbd-server = { workspace = true }
tracing-subscriber = { workspace = true }

[[bench]]
name = "throughput"
Expand Down
26 changes: 26 additions & 0 deletions crates/tx5/src/ep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,32 @@ pub enum EndpointEvent {
},
}

impl std::fmt::Debug for EndpointEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::ListeningAddressOpen { local_url } => {
f.debug_struct("ListeningAddressOpen").field("peer_url", local_url).finish()
}
Self::ListeningAddressClosed { local_url } => {
f.debug_struct("ListeningAddressClosed")
.field("peer_url", local_url)
.finish()
}
Self::Connected { peer_url } => {
f.debug_struct("Connected").field("peer_url", peer_url).finish()
}
Self::Disconnected { peer_url } => {
f.debug_struct("Disconnected")
.field("peer_url", peer_url)
.finish()
}
Self::Message { peer_url, .. } => {
f.debug_struct("Message").field("peer_url", peer_url).finish()
}
}
}
}

pub(crate) struct EpInner {
this: Weak<Mutex<EpInner>>,
config: Arc<Config>,
Expand Down
3 changes: 3 additions & 0 deletions crates/tx5/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ pub(crate) use peer::*;
mod ep;
pub use ep::*;

#[cfg(test)]
mod test;

//pub use tx5_core::Tx5InitConfig;

// #[cfg(test)]
Expand Down
Loading

0 comments on commit 3c3b6ae

Please sign in to comment.