about summary refs log tree commit diff
path: root/src/libstd/net
AgeCommit message (Collapse)AuthorLines
2016-11-27Auto merge of #37983 - GuillaumeGomez:tcp_listener_doc, r=frewsxcvbors-3/+118
Add examples for TcpListener struct r? @frewsxcv
2016-11-27Add examples for TcpListener structGuillaume Gomez-3/+118
2016-11-26Auto merge of #38004 - GuillaumeGomez:tcp_stream_doc, r=frewsxcvbors-8/+185
Add missing urls and examples to TcpStream r? @frewsxcv
2016-11-26Add part of missing UdpSocket's urls and examplesGuillaume Gomez-11/+215
2016-11-26Rollup merge of #37962 - GuillaumeGomez:socket-v6, r=frewsxcvSeo Sanghyeon-0/+84
Add missing examples to SocketAddrV6 r? @steveklabnik cc @frewsxcv
2016-11-25Add missing urls and examples to TcpStreamGuillaume Gomez-8/+185
2016-11-23Add missing examples to SocketAddrV6Guillaume Gomez-0/+84
2016-11-23Add ::1 example in IPv6 to IPv4 conversionGuillaume Gomez-15/+44
2016-11-22Add missing examples for Ipv6AddrGuillaume Gomez-0/+129
2016-11-21Add missing examples for SocketAddrV4Guillaume Gomez-0/+46
2016-11-19Add missing examples in SocketAddrGuillaume Gomez-1/+78
2016-11-16Add examples for Ipv4AddrGuillaume Gomez-1/+124
2016-11-16Add missing urls and improve internal doc representationGuillaume Gomez-6/+21
2016-11-09Clarify that send_to might return an error in certain casesAbhishek Chanda-0/+3
Closes #34202
2016-10-12Auto merge of #36762 - achanda:sockaddr_type, r=alexcrichtonbors-0/+35
Add two functions to check type of SockAddr These can be used to determine the type of the underlying IP address r? @alexcrichton
2016-10-10Auto merge of #36707 - achanda:ip_type, r=alexcrichtonbors-0/+32
Add two functions to check type of given address The is_v4 function returns true if the given IP is v4. The is_v6 function returns true if the IP is v6.
2016-10-04Rollup merge of #36902 - ollie27:stab_impls, r=alexcrichtonManish Goregaokar-3/+2
std: Correct stability attributes for some implementations These are displayed by rustdoc so should be correct.
2016-10-03Add two functions to check type of SockAddrAbhishek Chanda-0/+35
These can be used to determine the type of the underlying IP address
2016-10-03Add two functions to check type of given addressAbhishek Chanda-0/+32
The is_v4 function returns true if the given IP is v4. The is_v6 function returns true if the IP is v6.
2016-10-02Add a platform-abstraction tidy scriptBrian Anderson-1/+3
This is intended to maintain existing standards of code organization in hopes that the standard library will continue to be refactored to isolate platform-specific bits, making porting easier; where "standard library" roughly means "all the dependencies of the std and test crates". This generally means placing restrictions on where `cfg(unix)`, `cfg(windows)`, `cfg(target_os)` and `cfg(target_env)` may appear, the basic objective being to isolate platform-specific code to the platform-specific `std::sys` modules, and to the allocation, unwinding, and libc crates. Following are the basic rules, though there are currently exceptions: - core may not have platform-specific code - liballoc_system may have platform-specific code - liballoc_jemalloc may have platform-specific code - libpanic_abort may have platform-specific code - libpanic_unwind may have platform-specific code - other crates in the std facade may not - std may have platform-specific code in the following places - sys/unix/ - sys/windows/ - os/ There are plenty of exceptions today though, noted in the whitelist.
2016-10-01std: Correct stability attributes for some implementationsOliver Middleton-3/+2
These are displayed by rustdoc so should be correct.
2016-09-30Ignore various entire test modules on emscriptenBrian Anderson-3/+0
2016-09-30Ignore entire test modules on emscripten instead of individual testsBrian Anderson-48/+6
2016-09-30Ignore lots and lots of std tests on emscriptenBrian Anderson-0/+46
2016-09-22Rollup merge of #36423 - GuillaumeGomez:eq_impl, r=pnkfelixJonathan Turner-2/+2
Add missing Eq implementations Part of #36301.
2016-09-18Add missing Eq implementationsGuillaume Gomez-2/+2
2016-09-13Add doc examples for std::net::IpAddr construction.Corey Farwell-0/+18
2016-08-30doc: make TcpListener example more simpleTshepang Lekhonkhobe-8/+1
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-15/+0
2016-08-19std: Stabilize APIs for the 1.12 releaseAlex Crichton-10/+5
Stabilized * `Cell::as_ptr` * `RefCell::as_ptr` * `IpAddr::is_{unspecified,loopback,multicast}` * `Ipv6Addr::octets` * `LinkedList::contains` * `VecDeque::contains` * `ExitStatusExt::from_raw` - both on Unix and Windows * `Receiver::recv_timeout` * `RecvTimeoutError` * `BinaryHeap::peek_mut` * `PeekMut` * `iter::Product` * `iter::Sum` * `OccupiedEntry::remove_entry` * `VacantEntry::into_key` Deprecated * `Cell::as_unsafe_cell` * `RefCell::as_unsafe_cell` * `OccupiedEntry::remove_pair` Closes #27708 cc #27709 Closes #32313 Closes #32630 Closes #32713 Closes #34029 Closes #34392 Closes #34285 Closes #34529
2016-08-01Link to relevant method/struct for `std::net::Shutdown` docs.Corey Farwell-1/+5
2016-08-01Indicate where the `std::net::Incoming` struct is created.Corey Farwell-0/+5
2016-07-20Auto merge of #34694 - mathphreak:master, r=alexcrichtonbors-0/+121
Add IpAddr common methods Per https://github.com/rust-lang/rfcs/pull/1668#issuecomment-230867962 no RFC is needed here. The generated documentation for these methods is being weird. It shows a deprecation message referencing #27709 for each of them even though two of the referenced methods were stabilized as part of that issue. I don't know how best to address that.
2016-07-11Mark Ipv4Addr is_unspecified as stable and provide reference.Ben Stern-0/+4
2016-07-07Add links to Ipv*Addr methods in docsMatt Horn-5/+15
per https://github.com/rust-lang/rust/pull/34694#issuecomment-231126489
2016-07-06Properly mark new methods as unstableMatt Horn-5/+8
2016-07-06Mark new methods as unstableMatt Horn-0/+5
2016-07-06Add IpAddr common methodsMatt Horn-0/+103
2016-06-29Update documentation to reflect ignoring of unknown addressesTobias Bucher-1/+7
2016-06-29Ignore unknown address types when looking up hostsTobias Bucher-8/+3
Previously, any function using a `ToSocketAddrs` input would fail if passed a hostname that resolves to an address type different from the ones recognized by Rust. This also changes the `LookupHost` iterator to only include the known address types, as a result, it doesn't have to return `Result`s any more, which are likely misinterpreted as failed name lookups.
2016-06-13Improve IP reserved address docsOliver Middleton-20/+35
- Add links to all RFCs to make it clear these are not Rust RFCs. - Correct RFC numbers to match the numbers in [RFC 6890](https://tools.ietf.org/html/rfc6890) - Clean up formatting to show addresses and ranges in parentheses like (255.255.255.255)
2016-05-26Make Ipv4Addr cmp() fasterAlexander Polyakov-1/+1
2016-05-07Rollup merge of #33439 - birkenfeld:ip-rfc-refs, r=steveklabnikSteve Klabnik-5/+5
doc: make RFC references consistent Always add a space and end sentence with a full stop.
2016-05-05doc: make RFC references consistentGeorg Brandl-5/+5
2016-05-05Fix some some duplicate words.Georg Brandl-1/+1
2016-04-26Rollup merge of #33200 - sfackler:nonblocking-docs, r=alexcrichtonManish Goregaokar-1/+1
Fix reference to TCP in UDP docs Closees #33195
2016-04-26Rollup merge of #33167 - benaryorg:master, r=alexcrichtonManish Goregaokar-0/+2
clarify documentation of TcpStream::connect() for multiple valid addresses I am not sure how the UDP part of the stdlib behaves when passing multiple valid addresses, but it should be mentioned as there are legit use cases for [`impl<'a> ToSocketAddrs for &'a [SocketAddr]`](http://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html), a TCP fallback only being one. Just a little example program for anyone willing to enhance the documentation further: ```rust use std::net::SocketAddr; use std::net::ToSocketAddrs; use std::net::TcpStream; fn main() { let v: Vec<SocketAddr> = vec! [ "127.0.0.1:1338".to_socket_addrs().unwrap().next().unwrap(), "127.0.0.1:1337".to_socket_addrs().unwrap().next().unwrap(), "127.0.0.1:1339".to_socket_addrs().unwrap().next().unwrap(), ]; let stream = TcpStream::connect(&v[..]).unwrap(); } ```
2016-04-25Fix reference to TCP in UDP docsSteven Fackler-1/+1
Closees #33195
2016-04-23clarify documentation of TcpStream::connect() for multiple valid addressesbenaryorg-0/+2
Signed-off-by: benaryorg <binary@benary.org>
2016-04-20Remove IPV6_V6ONLY functionalitySteven Fackler-46/+0
These settings can only be adjusted before bind time, which doesn't make sense in the current set of functionality. These methods are stable, but haven't hit a stable release yet. Closes #33052 [breaking-change]