diff options
Diffstat (limited to 'net/src/transports/tcp.rs')
-rw-r--r-- | net/src/transports/tcp.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/src/transports/tcp.rs b/net/src/transports/tcp.rs index af50c10..21fce3d 100644 --- a/net/src/transports/tcp.rs +++ b/net/src/transports/tcp.rs @@ -71,7 +71,7 @@ impl ConnListener for TcpListener { } /// Connects to the given TCP address and port. -pub async fn dial_tcp(endpoint: &Endpoint) -> Result<TcpConn> { +pub async fn dial(endpoint: &Endpoint) -> Result<TcpConn> { let addr = SocketAddr::try_from(endpoint.clone())?; let conn = TcpStream::connect(addr).await?; conn.set_nodelay(true)?; @@ -79,7 +79,7 @@ pub async fn dial_tcp(endpoint: &Endpoint) -> Result<TcpConn> { } /// Listens on the given TCP address and port. -pub async fn listen_tcp(endpoint: &Endpoint) -> Result<TcpListener> { +pub async fn listen(endpoint: &Endpoint) -> Result<TcpListener> { let addr = SocketAddr::try_from(endpoint.clone())?; let listener = TcpListener::bind(addr).await?; Ok(listener) |