mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-18 04:21:22 +00:00
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:
@ -53,6 +53,7 @@ pub use crate::upgrade::{
|
||||
|
||||
use libp2p_core::{
|
||||
ConnectedPoint,
|
||||
Multiaddr,
|
||||
PeerId,
|
||||
upgrade::{self, UpgradeError},
|
||||
};
|
||||
@ -140,6 +141,9 @@ pub trait ProtocolsHandler: Send + 'static {
|
||||
/// Injects an event coming from the outside in the handler.
|
||||
fn inject_event(&mut self, event: Self::InEvent);
|
||||
|
||||
/// Notifies the handler of a change in the address of the remote.
|
||||
fn inject_address_change(&mut self, _new_address: &Multiaddr) {}
|
||||
|
||||
/// Indicates to the handler that upgrading an outbound substream to the given protocol has failed.
|
||||
fn inject_dial_upgrade_error(
|
||||
&mut self,
|
||||
|
Reference in New Issue
Block a user