From 7d6c0e68a19ad5e2e4e05cfc219d446be6ff2286 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Thu, 30 Nov 2023 22:52:53 +0300 Subject: jsonrpc: Enhance the API and add support for TCP, Unix, and TLS protocols. --- net/src/transports/unix.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'net/src/transports/unix.rs') diff --git a/net/src/transports/unix.rs b/net/src/transports/unix.rs index e504934..0698975 100644 --- a/net/src/transports/unix.rs +++ b/net/src/transports/unix.rs @@ -74,3 +74,15 @@ pub fn listen_unix(path: &String) -> Result { let listener = UnixListener::bind(path)?; Ok(listener) } + +impl From for Box { + fn from(conn: UnixStream) -> Self { + Box::new(UnixConn::new(conn)) + } +} + +impl From for Box { + fn from(listener: UnixListener) -> Self { + Box::new(listener) + } +} -- cgit v1.2.3