| Age | Commit message (Collapse) | Author | Lines |
|
Closes https://github.com/rust-lang/rust/issues/44050.
|
|
r=QuietMisdreavus
Fix most rendering warnings from switching to CommonMark
There's one big one lift, I'm filing a bug for it soon.
r? @rust-lang/docs
|
|
Expand docs/examples for TCP `set_nonblocking` methods.
Part of https://github.com/rust-lang/rust/issues/44050.
|
|
Part of https://github.com/rust-lang/rust/issues/44050.
|
|
|
|
Linux appears to set POLLOUT when a conection's refused, which is pretty
weird. Invert the check to look for an error explicitly. Also add an
explict test for this case.
Closes #45265.
|
|
Fix TcpStream::local_addr docs example code
The local address's port is not 8080 in this example, that's the remote peer address port. On my machine, the local address is different every time, so I've changed `assert_eq` to only test the IP address
|
|
Add a missing import and remove unused imports
|
|
The local address's port is not 8080 in this example, that's the remote peer address port. On my machine, the local address is different every time, so I've changed `assert_eq` to only test the IP address
|
|
This includes the following stabilizations:
- tcpstream_connect_timeout https://github.com/rust-lang/rust/pull/44563
- iterator_for_each https://github.com/rust-lang/rust/pull/44567
- ord_max_min https://github.com/rust-lang/rust/pull/44593
- compiler_fences https://github.com/rust-lang/rust/pull/44595
- needs_drop https://github.com/rust-lang/rust/pull/44639
- vec_splice https://github.com/rust-lang/rust/pull/44640
|
|
Ensure tcp test case passes when disconnected from network
net::tcp::tests::connect_timeout_unroutable fails when the network
is unreachable, like on a laptop disconnected from wifi. Check for
this error and allow the test to pass.
Closes #44645
|
|
net::tcp::tests::connect_timeout_unroutable fails when the network
is unreachable, like on a laptop disconnected from wifi. Check for
this error and allow the test to pass.
Closes #44645
|
|
Ipv4Addr and Ipv6Addr convenience constructors.
Introduce convenience constructors for common types.
This introduces the following constructors:
* Ipv6Addr::localhost()
* Ipv6Addr::unspecified()
* Ipv4Addr::localhost()
* Ipv4Addr::unspecified()
The recently added `From` implementations were nice for avoiding the fallibility of conversions from strings like `"127.0.0.1".parse().unwrap()`, and `"::1".parse().unwrap()`, but while the Ipv4 version is roughly comparable in verbosity, the Ipv6 version lacks zero-segment elision, which makes it significantly more awkward: `[0, 0, 0, 0, 0, 0, 0, 0].into()`. While there isn't a clear way to introduce zero elision to type that can infallibly be converted into Ipv6 addresses, this PR resolves the problem for the two most commonly used addresses, which, incidentally, are the ones that suffer the most from the lack of zero-segment elision.
This change is dead simple, and introduces no backwards incompatibility.
See also, [this topic on the inernals board](https://internals.rust-lang.org/t/pre-rfc-convenience-ip-address-constructors/5878)
|
|
r=alexcrichton
stabilize tcpstream_connect_timeout (closes #43079)
|
|
Clarify the behavior of UDP sockets wrt. multiple addresses in `connect`
CC @frewsxcv #22569 #44209
|
|
|
|
|
|
rustdoc: type-fixes
|
|
|
|
|
|
|
|
|
|
Expand docs of multi-address behavior of some UDP/TCP APIs.
Fixes https://github.com/rust-lang/rust/issues/22569.
|
|
Fixes https://github.com/rust-lang/rust/issues/22569.
|
|
|
|
in particular:
* show how to create an iterator that yields multiple socket addresses
* show more failing scenarios
|
|
Fix TcpStream::connect_timeout tracking issue number
Before: https://github.com/rust-lang/rust/pull/43709
After: https://github.com/rust-lang/rust/issues/43079
r? @sfackler
|
|
|
|
|
|
tidy will no longer complain about long lines containing links so there
is no reason to use a URL shortener here.
|
|
This breaks the "single syscall rule", but it's really annoying to hand
write and is pretty foundational.
|
|
This is an API that allows types to indicate that they can be passed
buffers of uninitialized memory which can improve performance.
|
|
Stabilize library features for 1.18.0
Closes #38863
Closes #38980
Closes #38903
Closes #36648
r? @alexcrichton
@rust-lang/libs
|
|
Closes #38863
Closes #38980
Closes #38903
Closes #36648
|
|
These were found by running tidy on stable versions of rust and finding
features stabilised with the wrong version numbers.
|
|
Clean up TcpStream example
Fixes #35950
|
|
Fixes #25164
|
|
Fixes #35950
|
|
* Since the switch to pulldown-cmark reference links need a blank line
before the URLs.
* Reference link references are not case sensitive.
* Doc comments need to be indented uniformly otherwise rustdoc gets
confused.
|
|
* Fixed spelling ToSocketAddr -> ToSocketAddrs in module docs
(which also fixes a link)
* Added missing "when" before "interacting" in module docs
* Changed SocketAddr's top-level docs to explicitly state what socket
addresses consist of, making them more consistent with SocketAddrV4's
and SocketAddrV6's docs
* Changed "in C" -> "in C's `netinet/in.h`"
* Changed wording in is_ipv4/is_ipv6 methods to ", `false` otherwise"
* Add missing closing ` ``` ` in Ipv6Addr's examples
* Removed "Errors" section in ToSocketAddrs' to_socket_addrs method as it
was rather redundant
|
|
|
|
Part of #29363
|
|
Part of #29363
|
|
Part of #29363
|
|
|
|
docs
Part of #29363
Changed summary sentences of SocketAddr and IpAddr for consistency
Linked to SocketAddrV4 and SocketAddrV6 from SocketAddr, moving explaination
there
Expanded top-level docs for SocketAddrV4 and SocketAddrV6, linking to some
relevant IETF RFCs, and linking back to SocketAddr
Changed some of the method summaries to third person as per RFC 1574; added
links to IETF RFCs where appropriate
|
|
Relative links in trait methods don't resolve in e.g.
std/primitive.tuple.html
:(
|
|
Part of #29363
Expanded top-level documentation & linked to relevant IETF RFCs.
Added a bunch of links (to true/false/Ipv4Addr/etc.) throughout the docs.
|
|
Additionally changed the summary sentence to be more consistent with most
of the other FromStr implementations' error types.
|
|
Part of #29363
In the section about the default implementations of ToSocketAddrs,
I moved the bulletpoint of SocketAddrV4 & SocketAddrV6 to the one
stating that SocketAddr is constructed trivially, as this is what's
actually the case
|