]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #23352 - alexcrichton:stabilize-net, r=aturon
authorbors <bors@rust-lang.org>
Tue, 17 Mar 2015 00:50:26 +0000 (00:50 +0000)
committerbors <bors@rust-lang.org>
Tue, 17 Mar 2015 00:50:26 +0000 (00:50 +0000)
This commit performs a stabilization pass over the std::net module,
incorporating the changes from RFC 923. Specifically, the following actions were
taken:

Stable functionality:

* `net` (the name)
* `Shutdown`
* `Shutdown::{Read, Write, Both}`
* `lookup_host`
* `LookupHost`
* `SocketAddr`
* `SocketAddr::{V4, V6}`
* `SocketAddr::port`
* `SocketAddrV4`
* `SocketAddrV4::{new, ip, port}`
* `SocketAddrV6`
* `SocketAddrV4::{new, ip, port, flowinfo, scope_id}`
* Common trait impls for socket addr structures
* `ToSocketAddrs`
* `ToSocketAddrs::Iter`
* `ToSocketAddrs::to_socket_addrs`
* `ToSocketAddrs for {SocketAddr*, (Ipv*Addr, u16), str, (str, u16)}`
* `Ipv4Addr`
* `Ipv4Addr::{new, octets, to_ipv6_compatible, to_ipv6_mapped}`
* `Ipv6Addr`
* `Ipv6Addr::{new, segments, to_ipv4}`
* `TcpStream`
* `TcpStream::connect`
* `TcpStream::{peer_addr, local_addr, shutdown, try_clone}`
* `{Read,Write} for {TcpStream, &TcpStream}`
* `TcpListener`
* `TcpListener::bind`
* `TcpListener::{local_addr, try_clone, accept, incoming}`
* `Incoming`
* `UdpSocket`
* `UdpSocket::bind`
* `UdpSocket::{recv_from, send_to, local_addr, try_clone}`

Unstable functionality:

* Extra methods on `Ipv{4,6}Addr` for various methods of inspecting the address
  and determining qualities of it.
* Extra methods on `TcpStream` to configure various protocol options.
* Extra methods on `UdpSocket` to configure various protocol options.

Deprecated functionality:

* The `socket_addr` method has been renamed to `local_addr`

This commit is a breaking change due to the restructuring of the `SocketAddr`
type as well as the renaming of the `socket_addr` method. Migration should be
fairly straightforward, however, after accounting for the new level of
abstraction in `SocketAddr` (protocol distinction at the socket address level,
not the IP address).

[breaking-change]

1  2 
src/libstd/net/ip.rs
src/libstd/net/mod.rs

Simple merge
index 95920d8d2b68e5fa62838159e70c4db147ae85ee,5f7c7babbcf74b97e73fc68dd5fd4afee73a8b49..36f36af73e1480c10bc435e1455e8f8d48c41122
  //! Networking primitives for TCP/UDP communication
  //!
  //! > **NOTE**: This module is very much a work in progress and is under active
 -//! > development. At this time it is still recommended to use the `old_io`
 -//! > module while the details of this module shake out.
 +//! > development.
  
- #![unstable(feature = "net")]
+ #![stable(feature = "rust1", since = "1.0.0")]
  
  use prelude::v1::*;