mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-24 02:50:34 +00:00
threadshare: Update to socket2 0.4
This commit is contained in:
parent
d9e727050c
commit
b919d226b1
4 changed files with 20 additions and 16 deletions
|
@ -124,6 +124,13 @@ version = "0.3"
|
|||
name = "ansi_term"
|
||||
version = "0.11"
|
||||
|
||||
# ignore duplicated socket2 dependency because hyper and miow depend on an old version
|
||||
# https://github.com/yoshuawuyts/miow/pull/44
|
||||
# https://github.com/hyperium/hyper/pull/2472
|
||||
[[bans.skip]]
|
||||
name = "socket2"
|
||||
version = "0.3"
|
||||
|
||||
[sources]
|
||||
unknown-registry = "deny"
|
||||
unknown-git = "deny"
|
||||
|
|
|
@ -19,14 +19,11 @@ once_cell = "1"
|
|||
tokio = { git = "https://github.com/fengalin/tokio", tag = "tokio-0.2.13-throttling", features = ["io-util", "macros", "rt-core", "sync", "stream", "time", "tcp", "udp", "rt-util"] }
|
||||
futures = { version = "0.3", features = ["thread-pool"] }
|
||||
rand = "0.8"
|
||||
socket2 = "0.3"
|
||||
socket2 = {features = ["all"], version = "0.4"}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = { version = "0.3", features = ["winsock2", "processthreadsapi"] }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
socket2 = { version = "0.3", features = ["reuseport"] }
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
|
|
|
@ -778,14 +778,14 @@ impl UdpSink {
|
|||
|
||||
let socket = match family {
|
||||
SocketFamily::Ipv4 => socket2::Socket::new(
|
||||
socket2::Domain::ipv4(),
|
||||
socket2::Type::dgram(),
|
||||
Some(socket2::Protocol::udp()),
|
||||
socket2::Domain::IPV4,
|
||||
socket2::Type::DGRAM,
|
||||
Some(socket2::Protocol::UDP),
|
||||
),
|
||||
SocketFamily::Ipv6 => socket2::Socket::new(
|
||||
socket2::Domain::ipv6(),
|
||||
socket2::Type::dgram(),
|
||||
Some(socket2::Protocol::udp()),
|
||||
socket2::Domain::IPV6,
|
||||
socket2::Type::DGRAM,
|
||||
Some(socket2::Protocol::UDP),
|
||||
),
|
||||
};
|
||||
|
||||
|
|
|
@ -511,15 +511,15 @@ impl UdpSrc {
|
|||
|
||||
let socket = if addr.is_ipv4() {
|
||||
socket2::Socket::new(
|
||||
socket2::Domain::ipv4(),
|
||||
socket2::Type::dgram(),
|
||||
Some(socket2::Protocol::udp()),
|
||||
socket2::Domain::IPV4,
|
||||
socket2::Type::DGRAM,
|
||||
Some(socket2::Protocol::UDP),
|
||||
)
|
||||
} else {
|
||||
socket2::Socket::new(
|
||||
socket2::Domain::ipv6(),
|
||||
socket2::Type::dgram(),
|
||||
Some(socket2::Protocol::udp()),
|
||||
socket2::Domain::IPV6,
|
||||
socket2::Type::DGRAM,
|
||||
Some(socket2::Protocol::UDP),
|
||||
)
|
||||
}
|
||||
.map_err(|err| {
|
||||
|
|
Loading…
Reference in a new issue