feat(net): impl active session (#219)

* feat(net): impl active stream

* rename fields

* work on active

* feat(net): add disconnect function

* more work on active session

* feat(net): add broadcast message variants

* feat: impl session future

* misc: refactor

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
Matthias Seitz
2022-11-21 11:31:03 +01:00
committed by GitHub
parent 4936d467c9
commit f7c6ae5858
9 changed files with 523 additions and 147 deletions

View File

@ -72,12 +72,12 @@ impl Discovery {
}
/// Manually adds an address to the set.
pub(crate) fn add_known_address(&mut self, node_id: PeerId, addr: SocketAddr) {
pub(crate) fn add_known_address(&mut self, peer_id: PeerId, addr: SocketAddr) {
self.on_discv4_update(TableUpdate::Added(NodeRecord {
address: addr.ip(),
tcp_port: addr.port(),
udp_port: addr.port(),
id: node_id,
id: peer_id,
}))
}