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/udp.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net/src/transports/udp.rs') diff --git a/net/src/transports/udp.rs b/net/src/transports/udp.rs index 8a2fbec..9576876 100644 --- a/net/src/transports/udp.rs +++ b/net/src/transports/udp.rs @@ -73,3 +73,9 @@ pub async fn listen_udp(addr: &Addr, port: &Port) -> Result { let udp_conn = UdpConn::new(conn); Ok(udp_conn) } + +impl From for Box { + fn from(conn: UdpSocket) -> Self { + Box::new(UdpConn::new(conn)) + } +} -- cgit v1.2.3