mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
ptp: Set UDP sockets as non-blocking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4665>
This commit is contained in:
parent
b76f9c8392
commit
5a79d230ce
1 changed files with 3 additions and 0 deletions
|
@ -81,6 +81,9 @@ fn create_socket(port: u16) -> Result<UdpSocket, Error> {
|
|||
let socket = UdpSocket::bind(SocketAddr::from((Ipv4Addr::UNSPECIFIED, port)))
|
||||
.with_context(|| format!("Failed to bind socket to port {}", port))?;
|
||||
|
||||
socket
|
||||
.set_nonblocking(true)
|
||||
.context("Failed setting socket non-blocking")?;
|
||||
socket.set_ttl(1).context("Failed setting TTL on socket")?;
|
||||
socket
|
||||
.set_multicast_ttl_v4(1)
|
||||
|
|
Loading…
Reference in a new issue