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` --- jsonrpc/src/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'jsonrpc/src') diff --git a/jsonrpc/src/server.rs b/jsonrpc/src/server.rs index 0038e89..44de336 100644 --- a/jsonrpc/src/server.rs +++ b/jsonrpc/src/server.rs @@ -25,7 +25,7 @@ pub struct ServerConfig { /// Represents an RPC server pub struct Server<'a> { - listener: Box, + listener: Listener, services: RwLock>>, task_group: TaskGroup<'a>, config: ServerConfig, @@ -33,7 +33,7 @@ pub struct Server<'a> { impl<'a> Server<'a> { /// Creates a new RPC server by passing a listener. It supports Tcp, Unix, and Tls. - pub fn new(listener: Box, config: ServerConfig, ex: Executor<'a>) -> Arc { + pub fn new(listener: Listener, config: ServerConfig, ex: Executor<'a>) -> Arc { Arc::new(Self { listener, services: RwLock::new(HashMap::new()), -- cgit v1.2.3