summary refs log tree commit diff
path: root/src/libstd/net
AgeCommit message (Collapse)AuthorLines
2017-10-26Improve docs for UdpSocket::set_nonblocking.Corey Farwell-4/+33
Closes https://github.com/rust-lang/rust/issues/44050.
2017-10-21Rollup merge of #45419 - steveklabnik:fix-commonmark-renderings, ↵Corey Farwell-1/+1
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
2017-10-21Rollup merge of #45227 - frewsxcv:frewsxcv-set-nonblocking, r=sfacklerCorey Farwell-7/+66
Expand docs/examples for TCP `set_nonblocking` methods. Part of https://github.com/rust-lang/rust/issues/44050.
2017-10-21Expand docs/examples for TCP `set_nonblocking` methods.Corey Farwell-7/+66
Part of https://github.com/rust-lang/rust/issues/44050.
2017-10-20Fix most rendering warnings from switching to CommonMarksteveklabnik-1/+1
2017-10-14Fix TcpStream::connect_timeout on linuxSteven Fackler-0/+15
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.
2017-10-07Auto merge of #44913 - leavehouse:patch-1, r=BurntSushibors-3/+3
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
2017-09-28Fix imports in TcpStream::local_addr docs exampleleavehouse-1/+1
Add a missing import and remove unused imports
2017-09-28Fix TcpStream::local_addr example codeleavehouse-2/+2
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
2017-09-24Backport libs stabilizations to 1.21 betaDavid Tolnay-1/+1
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
2017-09-17Rollup merge of #44647 - tmerr:fix-44645, r=dtolnayTim Neumann-2/+5
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
2017-09-17Ensure tcp test case passes when disconnected from networkTrevor Merrifield-2/+5
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
2017-09-16Rollup merge of #44395 - jcdyer:ip-constructors, r=alexcrichtonAlex Crichton-1/+89
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)
2017-09-14Rollup merge of #44563 - budziq:stablilize_tcpstream_connect_timeout, ↵Corey Farwell-1/+1
r=alexcrichton stabilize tcpstream_connect_timeout (closes #43079)
2017-09-14Rollup merge of #44388 - tbu-:pr_doc_udp_connect_multiple, r=frewsxcvCorey Farwell-16/+9
Clarify the behavior of UDP sockets wrt. multiple addresses in `connect` CC @frewsxcv #22569 #44209
2017-09-14Add unstable attributes for Ipv?Addr constructors.J. Cliff Dyer-5/+17
2017-09-14stabilize tcpstream_connect_timeout (closes #43079)Michal Budzynski-1/+1
2017-09-12rustdoc: extend UdpSocket API doc (#657)Frank Rehberger-13/+41
rustdoc: type-fixes
2017-09-08Add feature gate to doctests.J. Cliff Dyer-0/+4
2017-09-07Close doc examples and trim whitespace.J. Cliff Dyer-1/+5
2017-09-07IP address convenience constructorsJ. Cliff Dyer-0/+68
2017-09-07Clarify the behavior of UDP sockets wrt. multiple addresses in `connect`Tobias Bucher-16/+9
2017-08-31Rollup merge of #44209 - frewsxcv:frewsxcv-addr-other-scenarios, r=alexcrichtonMark Simulacrum-6/+92
Expand docs of multi-address behavior of some UDP/TCP APIs. Fixes https://github.com/rust-lang/rust/issues/22569.
2017-08-31Expand docs of multi-address behavior of some UDP/TCP APIs.Corey Farwell-6/+92
Fixes https://github.com/rust-lang/rust/issues/22569.
2017-08-30Fix typo in doc `ToSocketAddrs` example.Corey Farwell-1/+1
2017-08-28Rewrite `std::net::ToSocketAddrs` doc examples.Corey Farwell-22/+66
in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios
2017-08-13Rollup merge of #43833 - dtolnay:connect-timeout, r=sfacklerGuillaume Gomez-1/+1
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
2017-08-12Fix TcpStream::connect_timeout tracking issue numberDavid Tolnay-1/+1
2017-08-12Fix some typosBastien Orivel-2/+2
2017-08-07Stop using URL shortener in docsOliver Middleton-1/+1
tidy will no longer complain about long lines containing links so there is no reason to use a URL shortener here.
2017-07-06Implement TcpStream::connect_timeoutSteven Fackler-0/+33
This breaks the "single syscall rule", but it's really annoying to hand write and is pretty foundational.
2017-06-20Add `Read::initializer`.Steven Fackler-5/+9
This is an API that allows types to indicate that they can be passed buffers of uninitialized memory which can improve performance.
2017-05-21Auto merge of #41904 - sfackler:1.18-stabilization, r=alexcrichtonbors-6/+3
Stabilize library features for 1.18.0 Closes #38863 Closes #38980 Closes #38903 Closes #36648 r? @alexcrichton @rust-lang/libs
2017-05-20Stabilize library features for 1.18.0Steven Fackler-6/+3
Closes #38863 Closes #38980 Closes #38903 Closes #36648
2017-05-20Correct some stability versionsOliver Middleton-9/+9
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-04-27Rollup merge of #41526 - steveklabnik:gh35950, r=GuillaumeGomezCorey Farwell-9/+8
Clean up TcpStream example Fixes #35950
2017-04-26Address platform-specific behavior in TcpStream::shutdownsteveklabnik-0/+7
Fixes #25164
2017-04-26Clean up TcpStream examplesteveklabnik-9/+8
Fixes #35950
2017-04-06Fix Markdown issues in the docsOliver Middleton-2/+2
* 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.
2017-03-27Addressed requested changes for PR #40838lukaramu-26/+17
* 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
2017-03-26fix trailing whitespacelukaramu-1/+1
2017-03-26Expanded std::net module docslukaramu-0/+26
Part of #29363
2017-03-26Expanded top-level docs for std::net{TcpListener,TcpStream,UdpSocket}lukaramu-9/+58
Part of #29363
2017-03-26Added links to std::net::Shutdown docs and made them more consistentlukaramu-6/+19
Part of #29363
2017-03-26Added examples to std::net::{SocketAddr, SocketAddrV4, SocketAddrV6} docslukaramu-0/+36
2017-03-26Expanded and added links to std::net::{SocketAddr,SocketAddrV4,SocketAddrV6} ↵lukaramu-26/+90
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
2017-03-26Removed link in std::net::ToSocketAddr's summary sentencelukaramu-3/+1
Relative links in trait methods don't resolve in e.g. std/primitive.tuple.html :(
2017-03-26Expanded and added links to std::net::{IpAddr,Ipv4Addr,Ipv6Addr} docslukaramu-42/+160
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.
2017-03-26Added links to std::net::AddrParseError's documentationlukaramu-1/+13
Additionally changed the summary sentence to be more consistent with most of the other FromStr implementations' error types.
2017-03-26Added links throughout std::net::ToSocketAddrs' documentationlukaramu-17/+35
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