Skip to content

Commit

Permalink
Use quinn-udp instead of quinn::platform
Browse files Browse the repository at this point in the history
  • Loading branch information
kpp committed Aug 19, 2021
1 parent e6a283d commit 54c8c95
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = ["quinn", "quinn-proto", "interop", "bench", "perf", "fuzz"]
default-members = ["quinn", "quinn-proto", "interop", "bench", "perf"]
members = ["quinn", "quinn-proto", "quinn-udp", "interop", "bench", "perf", "fuzz"]
default-members = ["quinn", "quinn-proto", "quinn-udp", "interop", "bench", "perf"]

[profile.bench]
debug = true
Expand Down
29 changes: 29 additions & 0 deletions quinn-udp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "quinn-udp"
version = "0.7.0"
authors = ["Benjamin Saunders <ben.e.saunders@gmail.com>", "Dirkjan Ochtman <dirkjan@ochtman.nl>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/djc/quinn"
description = "State machine for the QUIC transport protocol"
keywords = ["quic"]
categories = [ "network-programming", "asynchronous" ]
workspace = ".."
edition = "2018"

[package.metadata.docs.rs]
all-features = true

[badges]
maintenance = { status = "experimental" }

[dependencies]
futures-util = { version = "0.3.11", features = ["io"] }
libc = "0.2.69"
mio = { version = "0.7.7", features = ["net"] }
proto = { package = "quinn-proto", path = "../quinn-proto", version = "0.7" }
socket2 = "0.4"
tracing = "0.1.10"
tokio = { version = "1.0.1", features = ["net"] }

[target.'cfg(unix)'.dependencies]
lazy_static = "1"
9 changes: 2 additions & 7 deletions quinn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,15 @@ bytes = "1"
futures-util = { version = "0.3.11", features = ["io"] }
futures-channel = "0.3.11"
fxhash = "0.2.1"
libc = "0.2.69"
mio = { version = "0.7.7", features = ["net"] }
once_cell = "1.7.2"
proto = { package = "quinn-proto", path = "../quinn-proto", version = "0.7" }
rustls = { version = "0.19", features = ["quic"], optional = true }
socket2 = "0.4"
thiserror = "1.0.21"
tracing = "0.1.10"
tokio = { version = "1.0.1", features = ["net", "rt", "time"] }
tokio = { version = "1.0.1", features = ["rt", "time"] }
udp = { package = "quinn-udp", path = "../quinn-udp", version = "0.7" }
webpki = { version = "0.21", optional = true }

[target.'cfg(unix)'.dependencies]
lazy_static = "1"

[dev-dependencies]
anyhow = "1.0.22"
crc = "1.8.1"
Expand Down
6 changes: 2 additions & 4 deletions quinn/src/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ use proto::{
};
use thiserror::Error;
use tracing::error;
use udp::UdpSocket;

use crate::{
endpoint::{Endpoint, EndpointDriver, EndpointRef, Incoming},
platform::UdpSocket,
};
use crate::endpoint::{Endpoint, EndpointDriver, EndpointRef, Incoming};
#[cfg(feature = "rustls")]
use crate::{Certificate, CertificateChain, PrivateKey};

Expand Down
2 changes: 1 addition & 1 deletion quinn/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ use proto::{ConnectionError, ConnectionHandle, ConnectionStats, Dir, StreamEvent
use thiserror::Error;
use tokio::time::{sleep_until, Instant as TokioInstant, Sleep};
use tracing::info_span;
use udp::caps;

use crate::{
broadcast::{self, Broadcast},
mutex::Mutex,
platform::caps,
recv_stream::RecvStream,
send_stream::{SendStream, WriteError},
ConnectionEvent, EndpointEvent, VarInt,
Expand Down
2 changes: 1 addition & 1 deletion quinn/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ use futures_util::StreamExt;
use fxhash::FxHashMap;
use once_cell::sync::OnceCell;
use proto::{self as proto, generic::ClientConfig, ConnectError, ConnectionHandle, DatagramEvent};
use udp::{RecvMeta, UdpSocket, BATCH_SIZE};

use crate::{
broadcast::{self, Broadcast},
builders::EndpointBuilder,
connection::Connecting,
platform::{RecvMeta, UdpSocket, BATCH_SIZE},
work_limiter::WorkLimiter,
ConnectionEvent, EndpointEvent, VarInt, IO_LOOP_BOUND, RECV_TIME_BOUND,
};
Expand Down
1 change: 0 additions & 1 deletion quinn/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ mod builders;
mod connection;
mod endpoint;
mod mutex;
mod platform;
mod recv_stream;
mod send_stream;
mod work_limiter;
Expand Down

0 comments on commit 54c8c95

Please sign in to comment.