Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion matchbox_socket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ once_cell = { version = "1.17", default-features = false, features = [
"alloc",
] }
derive_more = { version = "1.0", features = ["display", "from"] }
tokio-util = { version = "0.7", features = ["io", "compat"] }

ggrs = { version = "0.11", default-features = false, optional = true }
bincode = { version = "1.3", default-features = false, optional = true }
Expand Down Expand Up @@ -82,6 +81,7 @@ async-tungstenite = { version = "0.28", default-features = false, features = [
] }
webrtc = { version = "0.12", default-features = false }
async-compat = { version = "0.2", default-features = false }
tokio-util = { version = "0.7", features = ["io", "compat"] }

[dev-dependencies]
futures-test = "0.3"
3 changes: 3 additions & 0 deletions matchbox_socket/src/webrtc_socket/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use futures_channel::mpsc::{SendError, TrySendError, UnboundedReceiver, Unbounde
use log::{debug, error};
use matchbox_protocol::PeerId;
use std::{collections::HashMap, future::ready, pin::Pin, task::Poll, time::Duration};
#[cfg(not(target_arch = "wasm32"))]
use tokio_util::{
compat::TokioAsyncWriteCompatExt,
io::{CopyToBytes, SinkWriter},
Expand Down Expand Up @@ -697,6 +698,7 @@ impl WebRtcSocket {
self.take_channel(pos)
}

#[cfg(not(target_arch = "wasm32"))]
/// Converts the [`WebRtcChannel`] of a given [`PeerId`] into a [`RawPeerChannel`].
pub fn take_raw_by_id(
&mut self,
Expand Down Expand Up @@ -836,6 +838,7 @@ async fn run_socket(
}
}

#[cfg(not(target_arch = "wasm32"))]
fn compat_read_write(
remote: PeerId,
stream: UnboundedReceiver<(PeerId, Packet)>,
Expand Down
Loading