aboutsummaryrefslogtreecommitdiff
path: root/p2p/src/connection.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-07-15 13:28:00 +0200
committerhozan23 <hozan23@karyontech.net>2024-07-15 13:28:00 +0200
commitdc4c448e597b08cba4c79c194b0c1aa517daab29 (patch)
tree5ec8a2585cac2bbe7e4c54150b0f3f2f556f5399 /p2p/src/connection.rs
parente15d3e6fd20b3f87abaad7ddec1c88b0e66419f9 (diff)
core: rename EventSys to EventEmitter
Diffstat (limited to 'p2p/src/connection.rs')
-rw-r--r--p2p/src/connection.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/p2p/src/connection.rs b/p2p/src/connection.rs
index 52190a8..c1a7a8c 100644
--- a/p2p/src/connection.rs
+++ b/p2p/src/connection.rs
@@ -4,7 +4,7 @@ use async_channel::Sender;
use bincode::Encode;
use karyon_core::{
- event::{EventListener, EventSys},
+ event::{EventEmitter, EventListener},
util::encode,
};
@@ -36,8 +36,8 @@ pub struct Connection {
pub(crate) direction: ConnDirection,
conn: Conn<NetMsg>,
disconnect_signal: Sender<Result<()>>,
- /// `EventSys` responsible for sending events to the registered protocols.
- protocol_events: Arc<EventSys<ProtocolID>>,
+ /// `EventEmitter` responsible for sending events to the registered protocols.
+ protocol_events: Arc<EventEmitter<ProtocolID>>,
pub(crate) remote_endpoint: Endpoint,
listeners: HashMap<ProtocolID, EventListener<ProtocolID, ProtocolEvent>>,
}
@@ -52,7 +52,7 @@ impl Connection {
Self {
conn,
direction,
- protocol_events: EventSys::new(),
+ protocol_events: EventEmitter::new(),
disconnect_signal: signal,
remote_endpoint,
listeners: HashMap::new(),