We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f01bb5e commit 68a18c4Copy full SHA for 68a18c4
src/libstd/net/tcp.rs
@@ -86,6 +86,8 @@ impl TcpStream {
86
/// `addr` is an address of the remote host. Anything which implements
87
/// `ToSocketAddrs` trait can be supplied for the address; see this trait
88
/// documentation for concrete examples.
89
+ /// In case `ToSocketAddrs::to_socket_addrs()` returns more than one entry,
90
+ /// then the first valid and reachable address is used.
91
#[stable(feature = "rust1", since = "1.0.0")]
92
pub fn connect<A: ToSocketAddrs>(addr: A) -> io::Result<TcpStream> {
93
super::each_addr(addr, net_imp::TcpStream::connect).map(TcpStream)
0 commit comments