diff options
| author | lukaramu <lukaramu@gmail.com> | 2017-03-25 17:11:08 +0100 |
|---|---|---|
| committer | lukaramu <lukaramu@gmail.com> | 2017-03-26 14:35:12 +0200 |
| commit | 169facfc288586b7635652abace56d56da2a6f99 (patch) | |
| tree | 30beee50c9aca1694a67923aa468b09ee8fbe3f9 /src/libstd/net | |
| parent | 7dd4e2db785c8ec360a989f69891b1e97dd4d369 (diff) | |
| download | rust-169facfc288586b7635652abace56d56da2a6f99.tar.gz rust-169facfc288586b7635652abace56d56da2a6f99.zip | |
added missing links in std::net TCP docs
part of #29363
Diffstat (limited to 'src/libstd/net')
| -rw-r--r-- | src/libstd/net/tcp.rs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index a07972468e6..8a21f17dc49 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -83,11 +83,15 @@ impl TcpStream { /// Opens a TCP connection to a remote host. /// /// `addr` is an address of the remote host. Anything which implements - /// `ToSocketAddrs` trait can be supplied for the address; see this trait + /// [`ToSocketAddrs`] trait can be supplied for the address; see this trait /// documentation for concrete examples. - /// In case `ToSocketAddrs::to_socket_addrs()` returns more than one entry, + /// In case [`ToSocketAddrs::to_socket_addrs()`] returns more than one entry, /// then the first valid and reachable address is used. /// + /// [`ToSocketAddrs`]: ../../std/net/trait.ToSocketAddrs.html + /// [`ToSocketAddrs::to_socket_addrs()`]: + /// ../../std/net/trait.ToSocketAddrs.html#tymethod.to_socket_addrs + /// /// # Examples /// /// ```no_run @@ -494,11 +498,14 @@ impl TcpListener { /// /// Binding with a port number of 0 will request that the OS assigns a port /// to this listener. The port allocated can be queried via the - /// `local_addr` method. + /// [`local_addr`] method. /// - /// The address type can be any implementor of `ToSocketAddrs` trait. See + /// The address type can be any implementor of [`ToSocketAddrs`] trait. See /// its documentation for concrete examples. /// + /// [`local_addr`]: #method.local_addr + /// [`ToSocketAddrs`]: ../../std/net/trait.ToSocketAddrs.html + /// /// # Examples /// /// ```no_run @@ -529,10 +536,12 @@ impl TcpListener { /// Creates a new independently owned handle to the underlying socket. /// - /// The returned `TcpListener` is a reference to the same socket that this + /// The returned [`TcpListener`] is a reference to the same socket that this /// object references. Both handles can be used to accept incoming /// connections and options set on one listener will affect the other. /// + /// [`TcpListener`]: ../../std/net/struct.TcpListener.html + /// /// # Examples /// /// ```no_run @@ -549,9 +558,11 @@ impl TcpListener { /// Accept a new incoming connection from this listener. /// /// This function will block the calling thread until a new TCP connection - /// is established. When established, the corresponding `TcpStream` and the + /// is established. When established, the corresponding [`TcpStream`] and the /// remote peer's address will be returned. /// + /// [`TcpStream`]: ../../std/net/struct.TcpStream.html + /// /// # Examples /// /// ```no_run |
