Allow StreamMuxer to notify changes in the address (#1621)

* Allow StreamMuxer to notify changes in the address

* Fix doc link

* Revert accidental rename

* Other accidental rename

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
This commit is contained in:
Pierre Krieger
2020-06-30 17:10:53 +02:00
committed by GitHub
parent d5b26359bb
commit 826f5130cd
23 changed files with 330 additions and 57 deletions

View File

@ -29,6 +29,7 @@ use crate::protocols_handler::{
use futures::prelude::*;
use libp2p_core::{
Multiaddr,
PeerId,
ConnectionInfo,
Connected,
@ -220,6 +221,10 @@ where
self.handler.inject_event(event);
}
fn inject_address_change(&mut self, new_address: &Multiaddr) {
self.handler.inject_address_change(new_address);
}
fn poll(&mut self, cx: &mut Context) -> Poll<
Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>
> {