Skip to main content

shuffle_advertise_addr

Function shuffle_advertise_addr 

Source
fn shuffle_advertise_addr(local_addr: SocketAddr, bind_host: &str) -> String
Expand description

Compute the address peers should use to reach our ShuffleReceiver.

The receiver binds to 0.0.0.0:0 (any interface, ephemeral port), so local_addr.ip() is the wildcard — publishing it unchanged leaves remote senders unable to connect. Swap in the host portion of the configured server bind, falling back to gethostname when bind is itself a wildcard, keeping the port from the actual bound socket.