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

@ -101,6 +101,15 @@ pub trait NetworkBehaviour: Send + 'static {
fn inject_connection_closed(&mut self, _: &PeerId, _: &ConnectionId, _: &ConnectedPoint)
{}
/// Informs the behaviour that the [`ConnectedPoint`] of an existing connection has changed.
fn inject_address_change(
&mut self,
_: &PeerId,
_: &ConnectionId,
_old: &ConnectedPoint,
_new: &ConnectedPoint
) {}
/// Informs the behaviour about an event generated by the handler dedicated to the peer identified by `peer_id`.
/// for the behaviour.
///