Skip to content

Commit

Permalink
rollup merge of rust-lang#22015: alexcrichton/netv2
Browse files Browse the repository at this point in the history
This commit is an implementation of [RFC 807][rfc] which adds a `std::net`
module for basic neworking based on top of `std::io`. This module serves as a
replacement for the `std::old_io::net` module and networking primitives in
`old_io`.

[rfc]: fillmein

The major focus of this redesign is to cut back on the level of abstraction to
the point that each of the networking types is just a bare socket. To this end
functionality such as timeouts and cloning has been removed (although cloning
can be done through `duplicate`, it may just yield an error).

With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`.
This work is entirely based on rust-lang#20785 and the only changes were to alter the
in-memory representation to match the `libc`-expected variants and to move from
public fields to accessors.
  • Loading branch information
alexcrichton committed Feb 11, 2015
2 parents 315730f + 395709c commit a105636
Show file tree
Hide file tree
Showing 18 changed files with 3,214 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ pub mod ffi;
pub mod old_io;
pub mod io;
pub mod fs;
pub mod net;
pub mod os;
pub mod env;
pub mod path;
Expand Down
Loading

0 comments on commit a105636

Please sign in to comment.