aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/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 /jsonrpc/src
parent7d6c0e68a19ad5e2e4e05cfc219d446be6ff2286 (diff)
net: rename `Listener` trait to `ConnListener`
Diffstat (limited to 'jsonrpc/src')
-rw-r--r--jsonrpc/src/server.rs4
1 files changed, 2 insertions, 2 deletions
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<dyn Listener>,
+ listener: Listener,
services: RwLock<HashMap<String, Box<dyn RPCService + 'a>>>,
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<dyn Listener>, config: ServerConfig, ex: Executor<'a>) -> Arc<Self> {
+ pub fn new(listener: Listener, config: ServerConfig, ex: Executor<'a>) -> Arc<Self> {
Arc::new(Self {
listener,
services: RwLock::new(HashMap::new()),