mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 16:51:34 +00:00
core/src: Remove poll_broadcast connection notification mechanism (#1527)
* core/src: Remove poll_broadcast connection notification mechanism The `Network::poll_broadcast` function has not proven to be useful. This commit removes the mechanism all the way down to the connection manager. With `poll_broadcast` gone there is no mechanism left to send commands to pending connections. Thereby command buffering for pending connections is not needed anymore and is thus removed in this commit as well. * core/src/connection/manager.rs: Remove warning comment Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
@ -269,18 +269,6 @@ where
|
||||
})
|
||||
}
|
||||
|
||||
/// Notifies the connection handler of _every_ connection of _every_ peer of an event.
|
||||
///
|
||||
/// This function is "atomic", in the sense that if `Poll::Pending` is returned then no event
|
||||
/// has been sent to any node yet.
|
||||
#[must_use]
|
||||
pub fn poll_broadcast(&mut self, event: &TInEvent, cx: &mut Context) -> Poll<()>
|
||||
where
|
||||
TInEvent: Clone
|
||||
{
|
||||
self.pool.poll_broadcast(event, cx)
|
||||
}
|
||||
|
||||
/// Returns a list of all connected peers, i.e. peers to whom the `Network`
|
||||
/// has at least one established connection.
|
||||
pub fn connected_peers(&self) -> impl Iterator<Item = &TPeerId> {
|
||||
@ -641,4 +629,3 @@ impl NetworkConfig {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user