about summary refs log tree commit diff
path: root/src/libstd/io/net/tcp.rs
diff options
context:
space:
mode:
authorVladimir Matveev <vladimir.matweev@gmail.com>2014-10-29 22:59:43 +0300
committerVladimir Matveev <vladimir.matweev@gmail.com>2014-11-05 12:01:23 +0300
commit7e3344b17f777f5bca0d3eaa9278fa2d628ca064 (patch)
tree89bbab5cbe0ab28446f554cd77d637db8c1dadcc /src/libstd/io/net/tcp.rs
parentac846749f0abbd0b6107406ba2f97886605e1ad4 (diff)
downloadrust-7e3344b17f777f5bca0d3eaa9278fa2d628ca064.tar.gz
rust-7e3344b17f777f5bca0d3eaa9278fa2d628ca064.zip
Migrated io::net::udp over to ToSocketAddr
UdpSocket constructor methods now use ToSocketAddr trait instead of
SocketAddr.

[breaking-change]
Diffstat (limited to 'src/libstd/io/net/tcp.rs')
-rw-r--r--src/libstd/io/net/tcp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/net/tcp.rs b/src/libstd/io/net/tcp.rs
index 5dffc45bcd8..ee5f56469ad 100644
--- a/src/libstd/io/net/tcp.rs
+++ b/src/libstd/io/net/tcp.rs
@@ -67,7 +67,7 @@ impl TcpStream {
     /// trait can be supplied for the address; see this trait documentation for
     /// concrete examples.
     pub fn connect<A: ToSocketAddr>(addr: A) -> IoResult<TcpStream> {
-        super::with_addresses(addr, |io, addr| io.tcp_connect(addr, None).map(TcpStream::new))
+        super::with_addresses_io(addr, |io, addr| io.tcp_connect(addr, None).map(TcpStream::new))
     }
 
     /// Creates a TCP connection to a remote socket address, timing out after
@@ -89,7 +89,7 @@ impl TcpStream {
             return Err(standard_error(TimedOut));
         }
 
-        super::with_addresses(addr, |io, addr|
+        super::with_addresses_io(addr, |io, addr|
             io.tcp_connect(addr, Some(timeout.num_milliseconds() as u64)).map(TcpStream::new)
         )
     }
@@ -324,7 +324,7 @@ impl TcpListener {
     /// to this listener. The port allocated can be queried via the
     /// `socket_name` function.
     pub fn bind<A: ToSocketAddr>(addr: A) -> IoResult<TcpListener> {
-        super::with_addresses(addr, |io, addr| io.tcp_bind(addr).map(|l| TcpListener { obj: l }))
+        super::with_addresses_io(addr, |io, addr| io.tcp_bind(addr).map(|l| TcpListener { obj: l }))
     }
 
     /// Returns the local socket address of this listener.