Adds support for handling interface changes to mdns behaviour. (#1830)

* mdns: handle address changes.

* Update examples.

* Use async-io.

* Fix tokio-chat.

* Address review comments.

* Update if-watch.

* Poll interfaces correctly.

* Use socket2 and remove wasm-time.

* Update if-watch.

* Update versions and changelogs.

* Further changelog updates.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
Co-authored-by: Roman S. Borschel <roman@parity.io>
This commit is contained in:
David Craven
2020-12-03 13:30:52 +01:00
committed by GitHub
parent 4bdb61be0d
commit 505a17dfc2
13 changed files with 161 additions and 167 deletions

View File

@ -121,7 +121,7 @@ fn main() -> Result<(), Box<dyn Error>> {
// Create a Swarm to manage peers and events
let mut swarm = {
let mdns = Mdns::new()?;
let mdns = task::block_on(Mdns::new())?;
let mut behaviour = MyBehaviour {
floodsub: Floodsub::new(local_peer_id.clone()),
mdns,