From d8425015363cc0ac4742f938dc3f8e9d0beaa933 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Thu, 30 Nov 2023 23:29:25 +0300 Subject: net: rename `Listener` trait to `ConnListener` --- p2p/src/listener.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'p2p/src') 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( self: Arc, - listener: Box, + listener: Box, callback: impl FnOnce(Conn) -> Fut + Clone + Send + 'static, ) where Fut: Future> + Send + 'static, @@ -152,7 +152,7 @@ impl Listener { } } - async fn listend(&self, endpoint: &Endpoint) -> Result> { + async fn listend(&self, endpoint: &Endpoint) -> Result> { if self.enable_tls { let tls_config = tls_server_config(&self.key_pair)?; tls::listen(endpoint, tls_config).await -- cgit v1.2.3