about summary refs log tree commit diff
path: root/src/libstd/net/udp.rs
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-30Deal with EINTR in net timeout testsJosh Stone-4/+16
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-07-11Add missing dyn in testsljedrz-1/+1
2018-03-28Remove hidden `foo` functions from doc examples; use `Termination` trait.Corey Farwell-14/+14
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-03-02Rollup merge of #48328 - frewsxcv:frewsxcv-clarify-error-zero-duration, ↵Manish Goregaokar-4/+34
r=sfackler Fixes #47311. r? @nrc
2018-02-25Rollup merge of #48330 - frewsxcv:frewsxcv-tests-zero-duration, r=sfacklerkennytm-0/+17
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-4/+34
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/+17
Part of https://github.com/rust-lang/rust/issues/48311
2018-02-17Unify 'Platform-specific behavior' documentation headings.Corey Farwell-2/+2
2018-01-11Make tests build on CloudABI.Ed Schouten-1/+1
There are some tests that need to be disabled on CloudABI specifically, due to the fact that the shims cannot be built in combination with unix::ext or windows::ext. Also improve the scoping of some imports to suppress compiler warnings.
2017-10-26Improve docs for UdpSocket::set_nonblocking.Corey Farwell-4/+33
Closes https://github.com/rust-lang/rust/issues/44050.
2017-10-20Fix most rendering warnings from switching to CommonMarksteveklabnik-1/+1
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-12rustdoc: extend UdpSocket API doc (#657)Frank Rehberger-13/+41
rustdoc: type-fixes
2017-09-07Clarify the behavior of UDP sockets wrt. multiple addresses in `connect`Tobias Bucher-16/+9
2017-08-31Expand docs of multi-address behavior of some UDP/TCP APIs.Corey Farwell-2/+48
Fixes https://github.com/rust-lang/rust/issues/22569.
2017-08-12Fix some typosBastien Orivel-1/+1
2017-05-20Stabilize library features for 1.18.0Steven Fackler-4/+2
Closes #38863 Closes #38980 Closes #38903 Closes #36648
2017-03-26Expanded top-level docs for std::net{TcpListener,TcpStream,UdpSocket}lukaramu-5/+25
Part of #29363
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-10/+10
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-02-05Rollup merge of #38983 - APTy:udp-peek, r=aturonCorey Farwell-0/+97
Add peek APIs to std::net Adds "peek" APIs to `std::net` sockets, including: - `UdpSocket.peek()` - `UdpSocket.peek_from()` - `TcpStream.peek()` These methods enable socket reads without side-effects. That is, repeated calls to `peek()` return identical data. This is accomplished by providing the POSIX flag `MSG_PEEK` to the underlying socket read operations. This also moves the current implementation of `recv_from` out of the platform-independent `sys_common` and into respective `sys/windows` and `sys/unix` implementations. This allows for more platform-dependent implementations where necessary. Fixes #38980
2017-02-04libstd/net: Add `peek` APIs to UdpSocket and TcpStreamTyler Julian-0/+97
These methods enable socket reads without side-effects. That is, repeated calls to peek() return identical data. This is accomplished by providing the POSIX flag MSG_PEEK to the underlying socket read operations. This also moves the current implementation of recv_from out of the platform-independent sys_common and into respective sys/windows and sys/unix implementations. This allows for more platform-dependent implementations.
2017-01-22libstd: replace all `try!` with `?` in documentation examplesUtkarsh Kukreti-3/+3
See #38644.
2017-01-10std/net/udp: Improve set_nonblocking testTyler Julian-4/+16
2016-12-12Rollup merge of #38067 - GuillaumeGomez:udp-doc, r=frewsxcv,nagisaCorey Farwell-1/+58
Add more examples to UpdSocket r? @frewsxcv
2016-12-04Add more examples to UpdSocketGuillaume Gomez-1/+58
2016-11-26Add part of missing UdpSocket's urls and examplesGuillaume Gomez-11/+215
2016-11-09Clarify that send_to might return an error in certain casesAbhishek Chanda-0/+3
Closes #34202
2016-09-30Ignore entire test modules on emscripten instead of individual testsBrian Anderson-14/+1
2016-09-30Ignore lots and lots of std tests on emscriptenBrian Anderson-0/+13
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-2/+0
2016-04-25Fix reference to TCP in UDP docsSteven Fackler-1/+1
Closees #33195
2016-04-20Remove IPV6_V6ONLY functionalitySteven Fackler-23/+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]
2016-03-27Extend linkchecker with anchor checkingmitaa-8/+8
This adds checks to ensure that: * link anchors refer to existing id's on the target page * id's are unique within an html document * page redirects are valid
2016-03-22try! -> ?Jorge Aparicio-1/+1
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-02-28Add UDP functionality from net2Steven Fackler-1/+252
2015-12-30Rollup merge of #30511 - defyrlt:issue_30507, r=steveklabnikSteve Klabnik-10/+11
Resolves #30507 r? @steveklabnik
2015-12-29Fix warnings when compiling stdlib with --testFlorian Hahn-13/+12
2015-12-22Removed usage of `drop` from `std::net::UdpSocket` docsdefyrlt-10/+11
Resolves #30507
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+1
2015-09-29Tweak Travis to use GCEAlex Crichton-5/+4
Travis CI has new infrastructure using the Google Compute Engine which has both faster CPUs and more memory, and we've been encouraged to switch as it should help our build times! The only downside currently, however, is that IPv6 is disabled, causing a number of standard library tests to fail. Consequently this commit tweaks our travis config in a few ways: * ccache is disabled as it's not working on GCE just yet * Docker is used to run tests inside which reportedly will get IPv6 working * A system LLVM installation is used instead of building LLVM itself. This is primarily done to reduce build times, but we want automation for this sort of behavior anyway and we can extend this in the future with building from source as well if needed. * gcc-specific logic is removed as the docker image for Ubuntu gives us a recent-enough gcc by default.
2015-09-14Drop upper bounds on net timeout testsSteven Fackler-2/+0
Windows's scheduler apparently has "problems" unblocking calls in the asked for time period.
2015-09-11std: Stabilize/deprecate features for 1.4Alex Crichton-8/+16
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
2015-08-15std: Add issues to all unstable featuresAlex Crichton-7/+8
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-51/+1
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-11Register new snapshotsAlex Crichton-3/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-03syntax: Implement #![no_core]Alex Crichton-0/+1
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-28std: Deprecate extra TcpStream/UdpSocket methodsAlex Crichton-0/+18
These methods are all covered by [RFC 1158] and are currently all available on stable Rust via the [`net2` crate][net2] on crates.io. This commit does not touch the timeout related functions as they're still waiting on `Duration` which is unstable anyway, so punting in favor of the `net2` crate wouldn't buy much. [RFC 1158]: https://github.com/rust-lang/rfcs/pull/1158 [net2]: http://crates.io/crates/net2 Specifically, this commit deprecates: * TcpStream::set_nodelay * TcpStream::set_keepalive * UdpSocket::set_broadcast * UdpSocket::set_multicast_loop * UdpSocket::join_multicast * UdpSocket::set_multicast_time_to_live * UdpSocket::set_time_to_live
2015-07-20std: Add IntoRaw{Fd,Handle,Socket} traitsAlex Crichton-1/+5
This commit is an implementation of [RFC 1174][rfc] which adds three new traits to the standard library: * `IntoRawFd` - implemented on Unix for all I/O types (files, sockets, etc) * `IntoRawHandle` - implemented on Windows for files, processes, etc * `IntoRawSocket` - implemented on Windows for networking types [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1174-into-raw-fd-socket-handle-traits.md Closes #27062