diff --git a/rs/qmux/Cargo.toml b/rs/qmux/Cargo.toml index 6384b8e7..e56e6487 100644 --- a/rs/qmux/Cargo.toml +++ b/rs/qmux/Cargo.toml @@ -33,7 +33,7 @@ tokio = { version = "1.27", features = ["sync", "time", "macros", "rt"] } tokio-rustls = { version = "0.26", optional = true } # Optional: WebSocket -tokio-tungstenite = { version = "0.29", optional = true } +tokio-tungstenite = { version = "0.30", optional = true } tracing = "0.1" web-transport-proto = { workspace = true } web-transport-trait = { workspace = true } diff --git a/rs/web-transport-ffi/Cargo.toml b/rs/web-transport-ffi/Cargo.toml index b26b03f0..00eee766 100644 --- a/rs/web-transport-ffi/Cargo.toml +++ b/rs/web-transport-ffi/Cargo.toml @@ -32,12 +32,12 @@ rustls-native-certs = "0.8" thiserror = "2" tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros"] } tokio-util = "0.7" -uniffi = { version = "0.31", features = ["cli"] } +uniffi = { version = "0.32", features = ["cli"] } url = "2" web-transport-quinn = { workspace = true } [build-dependencies] -uniffi = { version = "0.31", features = ["build"] } +uniffi = { version = "0.32", features = ["build"] } [dev-dependencies] rcgen = "0.14" diff --git a/rs/web-transport-quiche/Cargo.toml b/rs/web-transport-quiche/Cargo.toml index 43802ebc..4ad25eb2 100644 --- a/rs/web-transport-quiche/Cargo.toml +++ b/rs/web-transport-quiche/Cargo.toml @@ -21,7 +21,7 @@ all-features = true keylog = ["tokio-quiche/capture_keylogs"] [dependencies] -boring = "4" +boring = "5" bytes = "1" flume = "0.12" futures = "0.3" @@ -38,7 +38,7 @@ tokio = { version = "1", default-features = false, features = [ "time", ] } -tokio-quiche = "0.19" +tokio-quiche = "0.20" tracing = "0.1" url = "2" web-transport-proto = { workspace = true } diff --git a/rs/web-transport-quiche/src/ez/driver.rs b/rs/web-transport-quiche/src/ez/driver.rs index f823756a..3a63b6de 100644 --- a/rs/web-transport-quiche/src/ez/driver.rs +++ b/rs/web-transport-quiche/src/ez/driver.rs @@ -12,7 +12,6 @@ use std::{ use kio::{Waiter, WaiterList}; use tokio_quiche::{ - buf_factory::BufFactory, quic::{HandshakeInfo, QuicheConnection}, quiche, }; @@ -434,8 +433,6 @@ pub(super) struct Driver { send: HashMap>, recv: HashMap>, - buf: Vec, - // Datagrams. Only the outbound half is a channel now; inbound datagrams and // accepted streams are queued in `DriverState` so they can be polled. dgram_out: flume::Receiver, @@ -457,7 +454,6 @@ impl Driver { state, send: HashMap::new(), recv: HashMap::new(), - buf: vec![0u8; BufFactory::MAX_BUF_SIZE], dgram_out, dgram_max, keep_alive: keep_alive.map(KeepAlive::new), @@ -886,10 +882,6 @@ impl tokio_quiche::ApplicationOverQuic for Driver { true } - fn buffer(&mut self) -> &mut [u8] { - &mut self.buf - } - async fn wait_for_data( &mut self, qconn: &mut QuicheConnection, @@ -911,9 +903,10 @@ impl tokio_quiche::ApplicationOverQuic for Driver { // The channel is bounded — if the application can't keep up we drop // the new datagram (consistent with the unreliable contract). loop { - match qconn.dgram_recv(&mut self.buf) { - Ok(len) => { - let buf = Bytes::copy_from_slice(&self.buf[..len]); + match qconn.dgram_recv_buf() { + Ok(dgram) => { + let (data, start) = dgram.into_parts(); + let buf = Bytes::from(data).slice(start..); let mut waiters = self.state.lock().push_dgram_in(buf); waiters.wake();