pub fn select_unicast(remote: &[Locator], local: &[Ipv4Addr]) -> Vec<Locator>Expand description
The unicast locators of a remote endpoint to send its messages to, of all it gives, so that each message reaches it once (rustorb-dds#108: RustDDS gives 127.0.0.1 besides its interface addresses, and a copy sent to each wastes the bandwidth and confused its reassembly).
local are this participant’s own unicast addresses. Locators that
are not UDPv4 are kept as they are. Of the UDPv4 ones:
- when one of them is an address in
local, the endpoint is on this host: its first loopback locator, or else that one; - when this participant is on loopback only, the loopback ones;
- else those that are not loopback (a loopback address of another host is this host), or all when there are none.