[][src]Function autodiscover_rs::run

pub fn run<F: Fn(Result<TcpStream>)>(
    connect_to: &SocketAddr,
    method: Method,
    spawn_callback: F
) -> Result<()>

run will block forever. It sends a notification using the configured method, then listens for other notifications and begins connecting to them, calling spawn_callback (which should return right away!) with the connected streams. The connect_to address should be a socket we have already bind'ed too, since we advertise that to other autodiscovery clients.