about summary refs log tree commit diff
path: root/src/libstd/net
AgeCommit message (Collapse)AuthorLines
2019-01-26Bump bootstrap compiler to 1.33 betaMark Rousskov-1/+0
2019-01-18Use `to_ne_bytes` for converting IPv4Address to octetsJakub Onderka-2/+1
It is easier and it should be also faster, because `to_ne_bytes` just calls `mem::transmute`.
2019-01-14Remove the `connect_timeout_unroutable` test.Nicholas Nethercote-11/+0
It requires an unreachable IP address, but there is no such thing, and this has caused it to fail for multiple people. Fixes #44698, fixes #50065.
2018-12-31const-stabilize Ipv4Addr::newMazdak Farrokhzad-1/+1
2018-12-25Remove licensesMark Rousskov-70/+0
2018-12-11Address unused variables warning with TcpStreamvarkor-0/+3
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-4/+4
2018-12-06Refactor net::each_addr/lookup_host to forward error from resolveJethro Beekman-24/+14
2018-11-30Deal with EINTR in net timeout testsJosh Stone-8/+22
We've seen sporadic QE failures in the timeout tests on this assertion: assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut); So there's an error, but not either of the expected kinds. Adding a format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`). For the cases that were using `read`, we can just use `read_exact` to keep trying after interruption. For those using `recv_from`, we have to manually loop until we get a non-interrupted result.
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-1/+1
fix various typos in doc comments
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-11-10reduce list to functions callable in const ctx.Mazdak Farrokhzad-3/+3
2018-11-10constify parts of libstd.Mazdak Farrokhzad-6/+5
2018-10-11Small changes to fix documentation auto compile issuesCharles Hathaway-1/+2
2018-10-10update tcp stream documentationCharles Hathaway-4/+3
2018-09-18Rollup merge of #53522 - phungleson:fix-impl-from-for-addr, r=TimNNGuillaume Gomez-0/+8
Add doc for impl From for Addr As part of issue #51430 (cc @skade). The impl is very simple, let me know if we need to go into any details. Additionally, I added `#[inline]` for the conversion method, let me know if it is un-necessary or might break something.
2018-08-21Add doc for impl From for AddrSon-0/+8
2018-08-21Rollup merge of #53213 - tmccombs:stable-ipconstructors, r=KodrAuskennytm-20/+5
Stabilize IP associated constants Fixes #44582
2018-08-14Stabilize IP associated constantsThayne McCombs-20/+5
Fixes #44582
2018-08-10Replace _.. with just .. in slice patternLinus Färnstrand-4/+4
2018-08-10Make use of match ergonomics in ip methodsLinus Färnstrand-36/+36
2018-08-10Use slice patterns to check IP octetsLinus Färnstrand-11/+14
2018-08-08Simplify Ipv6Addr::from(octets) to not use unsafeLinus Färnstrand-3/+1
2018-08-08Simplify is_broadcastLinus Färnstrand-2/+1
2018-08-08Add Ipv4Addr BROADCAST assoc constLinus Färnstrand-0/+18
2018-08-08Move IPs to assoc constsLinus Färnstrand-28/+20
2018-08-08Make Ipv{4,6}Addr::new const fnsLinus Färnstrand-20/+28
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-3/+3
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm
2018-07-25Merge remote-tracking branches 'ljedrz/dyn_libcore', 'ljedrz/dyn_libstd' and ↵Tatsuyuki Ishi-3/+3
'ljedrz/dyn_libterm' into dyn-rollup
2018-07-23libstd: Prefer `Option::map`/etc over `match` where applicableColin Wallace-4/+1
2018-07-17Fix doc comment: use `?` instead of `.unwrap()`Felix Rabe-1/+1
2018-07-11Add missing dyn in testsljedrz-2/+2
2018-07-10Deny bare trait objects in `src/libstd`.ljedrz-1/+1
2018-05-03Remove the deprecated std::net::{lookup_host,LookupHost}Josh Stone-68/+1
These are unstable, and were deprecated by #47510, since Rust 1.25. The internal `sys` implementations are still kept to support the call in the common `resolve_socket_addr`.
2018-04-01Auto merge of #49418 - frewsxcv:frewsxcv-network-order, r=TimNNbors-2/+80
Clarify network byte order conversions for integer / IP address conversions. Opened primarily to address https://github.com/rust-lang/rust/issues/48819. Also added a few other conversion docs/examples.
2018-03-28Auto merge of #49357 - frewsxcv:frewsxcv-termination-doc-examples, ↵bors-27/+27
r=GuillaumeGomez Remove hidden `foo` functions from doc examples; use `Termination` trait. Fixes https://github.com/rust-lang/rust/issues/49233. Easier to review with the white-space ignoring `?w=1` feature: https://github.com/rust-lang/rust/pull/49357/files?w=1
2018-03-28Clarify network byte order conversions for integer / IP address conversions.Corey Farwell-2/+80
Opened primarily to address https://github.com/rust-lang/rust/issues/48819.
2018-03-28Remove hidden `foo` functions from doc examples; use `Termination` trait.Corey Farwell-27/+27
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-03-26Auto merge of #49101 - mark-i-m:stabilize_i128, r=nagisabors-2/+2
Stabilize 128-bit integers :tada: cc #35118 EDIT: This should be merged only after the following have been merged: - [x] https://github.com/rust-lang-nursery/compiler-builtins/pull/236 - [x] https://github.com/rust-lang/book/pull/1230
2018-03-26Fix a few moreMark Mansi-2/+2
2018-03-26Rollup merge of #48932 - Phlosioneer:43601-document-opaque-size, r=KodrAusTim Neumann-0/+18
Document when types have OS-dependent sizes As per issue #43601, types that can change size depending on the target operating system should say so in their documentation. I used this template when adding doc comments: ``` The size of a(n) <name> struct may vary depending on the target operating system, and may change between Rust releases. ``` For enums, I used "instance" instead of "struct". I added documentation to these types: ``` - std::time::Instant (contains sys::time::Instant) - std::time::SystemTime (contains sys::time::SystemTime) - std::io::StdinRaw (contains sys::stdio::Stdin) - std::io::StdoutRaw (contains sys::stdio::Stdout) - std::io::Stderr (contains sys::stdio::Stderr) - std::net::addr::SocketAddrV4 (contains sys::net::netc::sockaddr_in) - std::net::addr::SocketAddrV6 (contains sys::net::netc::sockaddr_in6) - std::net::addr::SocketAddr (contains std::net::addr::SocketAddrV4 and SocketAddrV6) - std::net::ip::Ipv4Addr (contains sys::net::netc::in_addr) - std::net::ip::Ipv6Addr (contains sys::net::netc::in6_addr) - std::net::ip::IpAddr (contains std::net::ip::Ipv4Addr and Ipv6Addr) ``` I also found that these types varied in size; however, I don't think they need documentation, as it's already fairly obvious that they change based on different OS's: ``` - std::fs::DirBuilder (contains sys::fs::DirBuilder) - std::fs::FileType (contains sys::fs::FileType) - std::fs::Permissions (contains sys::fs::FilePermissions) - std::fs::OpenOptions (contains sys::fs::OpenOptions) - std::fs::DirEntry (contains sys::fs::DirEntry) - std::fs::ReadDir (contains sys::fs::ReadDir) - std::fs::Metadata (contains sys::fs::FileAttr) - std::fs::File (contains sys::fs::File) - std::process::Child (contains sys::process::Process) - std::process::ChildStdin (contains sys::process::AnonPipe) - std::process::ChildStdout (contains sys::process::AnonPipe) - std::process::ChildStderr (contains sys::process::AnonPipe) - std::process::Command (contains sys::process::Command) - std::process::Stdio (contains sys::process::Stdio) - std::process::ExitStatus (contains sys::process::ExitStatus) - std::process::Output (contains std::process::ExitStatus) - std::sys_common::condvar::Condvar (contains sys::condvar::Condvar) - std::sys_common::mutex::Mutex (contains sys::mutex::Mutex) - std::sys_common::net::LookupHost (contains sys::net::netc::addrinfo) - std::sys_common::net::TcpStream (contains sys::net::Socket) - std::sys_common::net::TcpListener (contains sys::net::Socket) - std::sys_common::net::UdpSocket (contains sys::net::Socket) - std::sys_common::remutex::ReentrantMutex (contains sys::mutex::ReentrantMutex) - std::sys_common::rwlock::RWLock (contains sys::rwlock::RWLock) - std::sys_common::thread_local::Key (contains sys::thread_local::Key) ``` Maybe we should just put a comment about the size of structs in the module-level docs for `fs`, `process`, and `sys_common`? If anyone can think of other types that can change size, comment below. I'm also open to changing the wording. closes #43601.
2018-03-24Add backticksPhlosioneer-5/+5
2018-03-20Remove StdioRaw doc additions, add backticksPhlosioneer-1/+1
2018-03-15Improve `AddrParseError` documentation.Anthony Defranceschi-0/+19
Add a potential cause to `AddrParseError` raising.
2018-03-11Remove "and may change between Rust releases"Phlosioneer-6/+6
2018-03-11Document when types have OS-dependent sizesPhlosioneer-0/+18
As per issue #43601, types that can change size depending on the target operating system should say so in their documentation. I used this template when adding doc comments: The size of a(n) <name> struct may vary depending on the target operating system, and may change between Rust releases. For enums, I used "instance" instead of "struct".
2018-03-02Rollup merge of #48328 - frewsxcv:frewsxcv-clarify-error-zero-duration, ↵Manish Goregaokar-8/+69
r=sfackler Fixes #47311. r? @nrc
2018-02-25Rollup merge of #48330 - frewsxcv:frewsxcv-tests-zero-duration, r=sfacklerkennytm-0/+37
Add tests ensuring zero-Duration timeouts result in errors; fix Redox issues. Part of #48311
2018-02-24Clarify "It is an error to..." wording for zero-duration behaviors.Corey Farwell-8/+69
Documentation fix side of https://github.com/rust-lang/rust/issues/48311.
2018-02-18Add tests ensuring zero-Duration timeouts result in errors.Corey Farwell-0/+37
Part of https://github.com/rust-lang/rust/issues/48311