aboutsummaryrefslogtreecommitdiff
path: root/p2p/src
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2023-11-30 23:29:25 +0300
committerhozan23 <hozan23@proton.me>2023-11-30 23:29:25 +0300
commitd8425015363cc0ac4742f938dc3f8e9d0beaa933 (patch)
treea0ddf1c3a653eb98bfd4b84eceb8c2ecb9587cfa /p2p/src
parent7d6c0e68a19ad5e2e4e05cfc219d446be6ff2286 (diff)
net: rename `Listener` trait to `ConnListener`
Diffstat (limited to 'p2p/src')
-rw-r--r--p2p/src/listener.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/p2p/src/listener.rs b/p2p/src/listener.rs
index 879f046..416a0d4 100644
--- a/p2p/src/listener.rs
+++ b/p2p/src/listener.rs
@@ -8,7 +8,7 @@ use karyons_core::{
GlobalExecutor,
};
-use karyons_net::{listen, tls, Conn, Endpoint, Listener as NetListener};
+use karyons_net::{listen, tls, Conn, ConnListener, Endpoint};
use crate::{
monitor::{ConnEvent, Monitor},
@@ -100,7 +100,7 @@ impl Listener {
async fn listen_loop<Fut>(
self: Arc<Self>,
- listener: Box<dyn NetListener>,
+ listener: Box<dyn ConnListener>,
callback: impl FnOnce(Conn) -> Fut + Clone + Send + 'static,
) where
Fut: Future<Output = Result<()>> + Send + 'static,
@@ -152,7 +152,7 @@ impl Listener {
}
}
- async fn listend(&self, endpoint: &Endpoint) -> Result<Box<dyn NetListener>> {
+ async fn listend(&self, endpoint: &Endpoint) -> Result<Box<dyn ConnListener>> {
if self.enable_tls {
let tls_config = tls_server_config(&self.key_pair)?;
tls::listen(endpoint, tls_config).await