1# 0.7.0 2 3Version 0.7 of Mio contains various major changes compared to version 0.6. 4Overall a large number of API changes have been made to reduce the complexity of 5the implementation and remove overhead where possible. 6 7Please refer to the [blog post about 80.7-alpha.1](https://tokio.rs/blog/2019-12-mio-v0.7-alpha.1/) for additional 9information. 10 11## Added 12 13* `Interest` structure that replaces `Ready` in registering event sources. 14* `Registry` structure that separates the registering and polling functionality. 15* `Waker` structure that allows another thread to wake a thread polling `Poll`. 16* Unix Domain Socket (UDS) types: `UnixDatagram`, `UnixListener` and 17 `UnixStream`. 18 19## Removed 20 21* All code deprecated in 0.6 was removed in 0.7. 22* Support for Fuchsia was removed as the code was unmaintained. 23* Support for Bitrig was removed, rustc dropped support for it also. 24* `UnixReady` was merged into `Ready`. 25* Custom user-space readiness queue was removed, this includes the public 26 `Registration` and `SetReadiness` types. 27* `PollOpt` was removed and all registrations use edge-triggers. See the upgrade 28 guide on how to process event using edge-triggers. 29* The network types (types in the `net` module) now support only the same API as 30 found in the standard library, various methods on the types were removed. 31* `TcpStream` now supports vectored I/O. 32* `Poll::poll_interruptible` was removed. Instead `Poll::poll` will now return 33 an error if one occurs. 34* `From<usize>` is removed from `Token`, the internal field is still public, so 35 `Token(my_token)` can still be used. 36 37## Changed 38 39* Various documentation improvements were made around correct usage of `Poll` 40 and registered event sources. It is recommended to reread the documentation of 41 at least `event::Source` and `Poll`. 42* Mio now uses Rust 2018 and rustfmt for all code. 43* `Event` was changed to be a wrapper around the OS event. This means it can be 44 significantly larger on some OSes. 45* `Ready` was removed and replaced with various `is_*` methods on `Event`. For 46 example instead checking for readable readiness using 47 `Event::ready().is_readble()`, you would call `Event::is_readble()`. 48* `Ready::is_hup` was removed in favour of `Event::is_read_closed` and 49 `Event::is_write_closed`. 50* The Iterator implementation of `Events` was changed to return `&Event`. 51* `Evented` was renamed to `event::Source` and now takes mutable reference to 52 the source. 53* Minimum supported Rust version was increased to 1.39. 54* By default Mio now uses a shim implementation. To enable the full 55 implementation, that uses the OS, enable the `os-oll` feature. To enable the 56 network types use `tcp`, `udp` and/or `uds`. For more documentation on the 57 features see the `feature` module in the API documentation (requires the 58 `extra-docs` feature). 59* The entire Windows implementation was rewritten. 60* Various optimisation were made to reduce the number of system calls in 61 creating and using sockets, e.g. making use of `accept4(2)`. 62* The `fmt::Debug` implementation of `Events` is now actually useful as it 63 prints all `Event`s. 64 65# 0.6.19 (May 28, 2018) 66 67### Fixed 68- Do not trigger HUP events on kqueue platforms (#958). 69 70# 0.6.18 (May 24, 2018) 71 72### Fixed 73- Fix compilation on kqueue platforms with 32bit C long (#948). 74 75# 0.6.17 (May 15, 2018) 76 77### Fixed 78- Don't report `RDHUP` as `HUP` (#939) 79- Fix lazycell related compilation issues. 80- Fix EPOLLPRI conflicting with READABLE 81- Abort process on ref count overflows 82 83### Added 84- Define PRI on all targets 85 86# 0.6.16 (September 5, 2018) 87 88* Add EPOLLPRI readiness to UnixReady on supported platforms (#867) 89* Reduce spurious awaken calls (#875) 90 91# 0.6.15 (July 3, 2018) 92 93* Implement `Evented` for containers (#840). 94* Fix android-aarch64 build (#850). 95 96# 0.6.14 (March 8, 2018) 97 98* Add `Poll::poll_interruptible` (#811) 99* Add `Ready::all` and `usize` conversions (#825) 100 101# 0.6.13 (February 5, 2018) 102 103* Fix build on DragonFlyBSD. 104* Add `TcpListener::from_std` that does not require the socket addr. 105* Deprecate `TcpListener::from_listener` in favor of from_std. 106 107# 0.6.12 (January 5, 2018) 108 109* Add `TcpStream::peek` function (#773). 110* Raise minimum Rust version to 1.18.0. 111* `Poll`: retry select() when interrupted by a signal (#742). 112* Deprecate `Events` index access (#713). 113* Add `Events::clear` (#782). 114* Add support for `lio_listio` (#780). 115 116# 0.6.11 (October 25, 2017) 117 118* Allow register to take empty interest (#640). 119* Fix bug with TCP errors on windows (#725). 120* Add TcpListener::accept_std (#733). 121* Update IoVec to fix soundness bug -- includes behavior change. (#747). 122* Minimum Rust version is now 1.14.0. 123* Fix Android x86_64 build. 124* Misc API & doc polish. 125 126# 0.6.10 (July 27, 2017) 127 128* Experimental support for Fuchsia 129* Add `only_v6` option for UDP sockets 130* Fix build on NetBSD 131* Minimum Rust version is now 1.13.0 132* Assignment operators (e.g. `|=`) are now implemented for `Ready` 133 134# 0.6.9 (June 7, 2017) 135 136* More socket options are exposed through the TCP types, brought in through the 137 `net2` crate. 138 139# 0.6.8 (May 26, 2017) 140 141* Support Fuchia 142* POSIX AIO support 143* Fix memory leak caused by Register::new2 144* Windows: fix handling failed TCP connections 145* Fix build on aarch64-linux-android 146* Fix usage of `O_CLOEXEC` with `SETFL` 147 148# 0.6.7 (April 27, 2017) 149 150* Ignore EPIPE coming out of `kevent` 151* Timer thread should exit when timer is dropped. 152 153# 0.6.6 (March 22, 2017) 154 155* Add send(), recv() and connect() to UDPSocket. 156* Fix bug in custom readiness queue 157* Move net types into `net` module 158 159# 0.6.5 (March 14, 2017) 160 161* Misc improvements to kqueue bindings 162* Add official support for iOS, Android, BSD 163* Reimplement custom readiness queue 164* `Poll` is now `Sync` 165* Officially deprecate non-core functionality (timers, channel, etc...) 166* `Registration` now implements `Evented` 167* Fix bug around error conditions with `connect` on windows. 168* Use iovec crate for scatter / gather operations 169* Only support readable and writable readiness on all platforms 170* Expose additional readiness in a platform specific capacity 171 172# 0.6.4 (January 24, 2017) 173 174* Fix compilation on musl 175* Add `TcpStream::from_stream` which converts a std TCP stream to Mio. 176 177# 0.6.3 (January 22, 2017) 178 179* Implement readv/writev for `TcpStream`, allowing vectored reads/writes to 180 work across platforms 181* Remove `nix` dependency 182* Implement `Display` and `Error` for some channel error types. 183* Optimize TCP on Windows through `SetFileCompletionNotificationModes` 184 185# 0.6.2 (December 18, 2016) 186 187* Allow registration of custom handles on Windows (like `EventedFd` on Unix) 188* Send only one byte for the awakener on Unix instead of four 189* Fix a bug in the timer implementation which caused an infinite loop 190 191# 0.6.1 (October 30, 2016) 192 193* Update dependency of `libc` to 0.2.16 194* Fix channel `dec` logic 195* Fix a timer bug around timeout cancellation 196* Don't allocate buffers for TCP reads on Windows 197* Touched up documentation in a few places 198* Fix an infinite looping timer thread on OSX 199* Fix compile on 32-bit OSX 200* Fix compile on FreeBSD 201 202# 0.6.0 (September 2, 2016) 203 204* Shift primary API towards `Poll` 205* `EventLoop` and types to `deprecated` mod. All contents of the 206 `deprecated` mod will be removed by Mio 1.0. 207* Increase minimum supported Rust version to 1.9.0 208* Deprecate unix domain socket implementation in favor of using a 209 version external to Mio. For example: https://github.com/alexcrichton/mio-uds. 210* Remove various types now included in `std` 211* Updated TCP & UDP APIs to match the versions in `std` 212* Enable implementing `Evented` for any type via `Registration` 213* Rename `IoEvent` -> `Event` 214* Access `Event` data via functions vs. public fields. 215* Expose `Events` as a public type that is passed into `Poll` 216* Use `std::time::Duration` for all APIs that require a time duration. 217* Polled events are now retrieved via `Events` type. 218* Implement `std::error::Error` for `TimerError` 219* Relax `Send` bound on notify messages. 220* Remove `Clone` impl for `Timeout` (future proof) 221* Remove `mio::prelude` 222* Remove `mio::util` 223* Remove dependency on bytes 224 225# 0.5.0 (December 3, 2015) 226 227* Windows support (#239) 228* NetBSD support (#306) 229* Android support (#295) 230* Don't re-export bytes types 231* Renamed `EventLoop::register_opt` to `EventLoop::register` (#257) 232* `EventLoopConfig` is now a builder instead of having public struct fields. It 233 is also no longer `Copy`. (#259) 234* `TcpSocket` is no longer exported in the public API (#262) 235* Integrate with net2. (#262) 236* `TcpListener` now returns the remote peer address from `accept` as well (#275) 237* The `UdpSocket::{send_to, recv_from}` methods are no longer generic over `Buf` 238 or `MutBuf` but instead take slices directly. The return types have also been 239 updated to return the number of bytes transferred. (#260) 240* Fix bug with kqueue where an error on registration prevented the 241 changelist from getting flushed (#276) 242* Support sending/receiving FDs over UNIX sockets (#291) 243* Mio's socket types are permanently associated with an EventLoop (#308) 244* Reduce unnecessary poll wakeups (#314) 245 246 247# 0.4.1 (July 21, 2015) 248 249* [BUGFIX] Fix notify channel concurrency bug (#216) 250 251# 0.4.0 (July 16, 2015) 252 253* [BUGFIX] EventLoop::register requests all events, not just readable. 254* [BUGFIX] Attempting to send a message to a shutdown event loop fails correctly. 255* [FEATURE] Expose TCP shutdown 256* [IMPROVEMENT] Coalesce readable & writable into `ready` event (#184) 257* [IMPROVEMENT] Rename TryRead & TryWrite function names to avoid conflict with std. 258* [IMPROVEMENT] Provide TCP and UDP types in Mio (path to windows #155) 259* [IMPROVEMENT] Use clock_ticks crate instead of time (path to windows #155) 260* [IMPROVEMENT] Move unix specific features into mio::unix module 261* [IMPROVEMENT] TcpListener sets SO_REUSEADDR by default 262