From df6aad2be4c6c5d11483f20e62d41e71f0ac989e Mon Sep 17 00:00:00 2001 From: hozan23 Date: Wed, 13 Mar 2024 12:33:34 +0100 Subject: net: major cleanup and improvement of the crate api --- net/src/transports/udp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/src/transports/udp.rs') diff --git a/net/src/transports/udp.rs b/net/src/transports/udp.rs index 991b1fd..bd1fe83 100644 --- a/net/src/transports/udp.rs +++ b/net/src/transports/udp.rs @@ -57,7 +57,7 @@ impl Connection for UdpConn { } /// Connects to the given UDP address and port. -pub async fn dial_udp(endpoint: &Endpoint) -> Result { +pub async fn dial(endpoint: &Endpoint) -> Result { let addr = SocketAddr::try_from(endpoint.clone())?; // Let the operating system assign an available port to this socket @@ -67,7 +67,7 @@ pub async fn dial_udp(endpoint: &Endpoint) -> Result { } /// Listens on the given UDP address and port. -pub async fn listen_udp(endpoint: &Endpoint) -> Result { +pub async fn listen(endpoint: &Endpoint) -> Result { let addr = SocketAddr::try_from(endpoint.clone())?; let conn = UdpSocket::bind(addr).await?; let udp_conn = UdpConn::new(conn); -- cgit v1.2.3