mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-20 10:14:16 +00:00
Update to socket2 v0.4
This commit is contained in:
committed by
Dirkjan Ochtman
parent
a5f8325ee7
commit
49475c22b2
+1
-1
@@ -13,7 +13,7 @@ hdrhistogram = { version = "7.2", default-features = false }
|
||||
quinn = { path = "../quinn" }
|
||||
rcgen = "0.8"
|
||||
rustls = { version = "0.19", features = ["dangerous_configuration"] }
|
||||
socket2 = "0.3"
|
||||
socket2 = "0.4"
|
||||
webpki = "0.21"
|
||||
structopt = "0.3"
|
||||
tokio = { version = "1.0.1", features = ["rt", "macros", "signal", "net", "sync"] }
|
||||
|
||||
+2
-9
@@ -9,15 +9,8 @@ pub fn bind_socket(
|
||||
send_buffer_size: usize,
|
||||
recv_buffer_size: usize,
|
||||
) -> Result<std::net::UdpSocket> {
|
||||
let socket = Socket::new(
|
||||
match addr.is_ipv4() {
|
||||
true => Domain::ipv4(),
|
||||
false => Domain::ipv6(),
|
||||
},
|
||||
Type::dgram(),
|
||||
Some(Protocol::udp()),
|
||||
)
|
||||
.context("create socket")?;
|
||||
let socket = Socket::new(Domain::for_address(addr), Type::DGRAM, Some(Protocol::UDP))
|
||||
.context("create socket")?;
|
||||
|
||||
if addr.is_ipv6() {
|
||||
socket.set_only_v6(false).context("set_only_v6")?;
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ libc = "0.2.69"
|
||||
mio = { version = "0.7.7", features = ["net"] }
|
||||
proto = { package = "quinn-proto", path = "../quinn-proto", version = "0.7" }
|
||||
rustls = { version = "0.19", features = ["quic"], optional = true }
|
||||
socket2 = "0.3"
|
||||
socket2 = "0.4"
|
||||
thiserror = "1.0.21"
|
||||
tracing = "0.1.10"
|
||||
tokio = { version = "1.0.1", features = ["net", "rt", "rt-multi-thread", "time"] }
|
||||
|
||||
Reference in New Issue
Block a user