Skip to main content

bind_udp

Function bind_udp 

Source
pub async fn bind_udp(
    bind: IpAddr,
    port: u16,
    iface: Option<Iface>,
    recv_buffer: Option<usize>,
) -> Result<UdpSocket>
Expand description

Bind a UDP socket configured for GVSP traffic.

port 0 lets the operating system choose a free port; read it back with local_addr. The socket is bound without SO_REUSEADDR or SO_REUSEPORT: a unicast stream port is this socket’s alone, and with either option a second stream on the same host could bind it too and take a share of the camera’s datagrams (SR-03).