NamedPipe::write
(https://github.com/tokio-rs/mio/commit/aec872be9732e5c6685100674278be27f54a271b).accept(2)
on x86 Android instead of accept4(2)
(https://github.com/tokio-rs/mio/commit/6f86b925d3e48f30905d5cfa54348acf3f1fa036, https://github.com/tokio-rs/mio/commit/8d5414880ab82178305ac1d2c16d715e58633d3e).TcpStream::set_linger
on macOS (https://github.com/tokio-rs/mio/commit/175773ce02e85977db81224c782c8d140aba8543).UdpSocket::only_v6
(https://github.com/tokio-rs/mio/commit/0101e05a800f17fb88f4315d9b9fe0f08cca6e57).Clone
implementation for Event
(https://github.com/tokio-rs/mio/commit/26540ebbae89df6d4d08465c56f715d8f2addfc3).AsRawFd
implementation for Registry
(https://github.com/tokio-rs/mio/commit/f70daa72da0042b1880256164774c3286d315a02).Read
and Write
implementation for &unix::pipe::Sender
and Receiver
, that is on the reference to them, an implementation existed on the types themselves already (https://github.com/tokio-rs/mio/commit/1be481dcbbcb6906364008b5d61e7f53cddc3eb3).SocketAddr::address
(https://github.com/tokio-rs/mio/commit/6d3fa69240cd4bb95e9d34605c660c30245a18bd).Waker::wake
works on illumos systems with poor pipe(2)
and epoll(2)
interaction using EPOLLET
(https://github.com/tokio-rs/mio/commit/943d4249dcc17cd8b4d2250c4fa19116097248fa).unix::pipe
on illumos (https://github.com/tokio-rs/mio/commit/0db49f6d5caf54b12176821363d154384357e70a).net
feature, replaces tcp
, udp
and uds
features (https://github.com/tokio-rs/mio/commit/a301ba520a8479b459c4acdcefa4a7c5eea818c7).os-ext
feature, replaces os-util
and pipe
features (https://github.com/tokio-rs/mio/commit/f5017fae8a3d3bb4b4cada25b01a2d76a406badc).TcpSocket
(https://github.com/tokio-rs/mio/commit/290c43a96662d54ab7c4b8814e5a9f9a9e523fda).TcpSocket::set_{send, recv}_buffer_size
(https://github.com/tokio-rs/mio/commit/40c4af79bf5b32b8fbdbf6f2e5c16290e1d3d406).TcpSocket::get_linger
(https://github.com/tokio-rs/mio/commit/13e82ced655bbb6e2729226e485a7de9f2c2ccd9).IntoRawFd
for TcpSocket
(https://github.com/tokio-rs/mio/commit/50548ed45d0b2c98f1f2e003e210d14195284ef4).tcp
, udp
and uds
features, replaced by a new net
feature. (https://github.com/tokio-rs/mio/commit/a301ba520a8479b459c4acdcefa4a7c5eea818c7).extra-docs
feature, now enabled by default. (https://github.com/tokio-rs/mio/commit/25731e8688a2d91c5c700674a2c2d3841240ece1).os-util
and pipe
features, replaced by a new os-ext
feature. (https://github.com/tokio-rs/mio/commit/f5017fae8a3d3bb4b4cada25b01a2d76a406badc).std::net::SocketAddr
. Previously Mio would assume that SocketAddrV{4,6}
had the same layout as libc::sockaddr_in(6)
, however this is not guaranteed by the standard library. (https://github.com/tokio-rs/mio/commit/152e0751f0be1c9b0cbd6778645b76bcb0eba93c).TcpSocket::get_localaddr()
retrieves local address (https://github.com/tokio-rs/mio/commit/b41a022b2242eef1969c70c8ba93e04c528dba47).TcpSocket::set_reuseport()
& TcpSocket::get_reuseport()
configures and reads SO_REUSEPORT
(https://github.com/tokio-rs/mio/commit/183bbe409ab69cbf9db41d0263b41ec86202d9a0).unix:pipe()
a wrapper around pipe(2) sys call (https://github.com/tokio-rs/mio/commit/2b7c0967a7362303946deb3d4ca2ae507af6c72d).Interest:remove()
(https://github.com/tokio-rs/mio/commit/b8639c3d9ac07bb7e2e27685680c8a6510fa1357).TcpSocket::set_linger()
configures SO_LINGER (https://github.com/tokio-rs/mio/commit/3b4096565c1a879f651b8f8282ecdcbdbd5c92d3).TcpSocket
for configuring a TCP socket before connecting or listening (https://github.com/tokio-rs/mio/commit/5b09e60d0f64419b989bda88c86a3147334a03b3).In January 2020 Rust reduced its support for 32-bit Apple targets (https://blog.rust-lang.org/2020/01/03/reducing-support-for-32-bit-apple-targets.html). Starting with v0.7.1 Mio will do the same as we're no longer checking 32 bit iOS/macOS on our CI.
epoll(2)
‘s EPOLLERR
event as Event::is_write_closed
if it’s the only event (https://github.com/tokio-rs/mio/commit/0c77b5712d675eeb9bd43928b5dd7d22b2c7ac0c).SO_NOSIGPIPE
on all sockets (not just UDP) on for Apple targets (https://github.com/tokio-rs/mio/commit/b8bbdcb0d3236f4c4acb257996d42a88dc9987d9).POLL_ABORT
on Windows (https://github.com/tokio-rs/mio/commit/a98da62b3ed1eeed1770aaca12f46d647e4fa749).SIO_BASE_HANDLE
calls on Windows (https://github.com/tokio-rs/mio/commit/b15fc18458a79ef8a51f73effa92548650f4e5dc).accept4(2)
(https://github.com/tokio-rs/mio/commit/4e306addc7144f2e02a7e8397c220b179a006a19).lazy_static
on Windows (https://github.com/tokio-rs/mio/commit/57e4c2a8ac153bc7bb87829e22cf0a21e3927e8a).Version 0.7 of Mio contains various major changes compared to version 0.6. Overall a large number of API changes have been made to reduce the complexity of the implementation and remove overhead where possible.
Please refer to the blog post about 0.7-alpha.1 for additional information.
Interest
structure that replaces Ready
in registering event sources.Registry
structure that separates the registering and polling functionality.Waker
structure that allows another thread to wake a thread polling Poll
.UnixDatagram
, UnixListener
and UnixStream
.UnixReady
was merged into Ready
.Registration
and SetReadiness
types.PollOpt
was removed and all registrations use edge-triggers. See the upgrade guide on how to process event using edge-triggers.net
module) now support only the same API as found in the standard library, various methods on the types were removed.TcpStream
now supports vectored I/O.Poll::poll_interruptible
was removed. Instead Poll::poll
will now return an error if one occurs.From<usize>
is removed from Token
, the internal field is still public, so Token(my_token)
can still be used.Poll
and registered event sources. It is recommended to reread the documentation of at least event::Source
and Poll
.Event
was changed to be a wrapper around the OS event. This means it can be significantly larger on some OSes.Ready
was removed and replaced with various is_*
methods on Event
. For example instead checking for readable readiness using Event::ready().is_readable()
, you would call Event::is_readable()
.Ready::is_hup
was removed in favour of Event::is_read_closed
and Event::is_write_closed
.Events
was changed to return &Event
.Evented
was renamed to event::Source
and now takes mutable reference to the source.os-oll
feature. To enable the network types use tcp
, udp
and/or uds
. For more documentation on the features see the feature
module in the API documentation (requires the extra-docs
feature).accept4(2)
.fmt::Debug
implementation of Events
is now actually useful as it prints all Event
s.=
dependency on cfg-if
.RDHUP
as HUP
(#939)Evented
for containers (#840).Poll::poll_interruptible
(#811)Ready::all
and usize
conversions (#825)TcpListener::from_std
that does not require the socket addr.TcpListener::from_listener
in favor of from_std.TcpStream::peek
function (#773).Poll
: retry select() when interrupted by a signal (#742).Events
index access (#713).Events::clear
(#782).lio_listio
(#780).only_v6
option for UDP sockets|=
) are now implemented for Ready
net2
crate.O_CLOEXEC
with SETFL
kevent
net
modulePoll
is now Sync
Registration
now implements Evented
connect
on windows.TcpStream::from_stream
which converts a std TCP stream to Mio.TcpStream
, allowing vectored reads/writes to work across platformsnix
dependencyDisplay
and Error
for some channel error types.SetFileCompletionNotificationModes
EventedFd
on Unix)libc
to 0.2.16dec
logicPoll
EventLoop
and types to deprecated
mod. All contents of the deprecated
mod will be removed by Mio 1.0.std
std
Evented
for any type via Registration
IoEvent
-> Event
Event
data via functions vs. public fields.Events
as a public type that is passed into Poll
std::time::Duration
for all APIs that require a time duration.Events
type.std::error::Error
for TimerError
Send
bound on notify messages.Clone
impl for Timeout
(future proof)mio::prelude
mio::util
EventLoop::register_opt
to EventLoop::register
(#257)EventLoopConfig
is now a builder instead of having public struct fields. It is also no longer Copy
. (#259)TcpSocket
is no longer exported in the public API (#262)TcpListener
now returns the remote peer address from accept
as well (#275)UdpSocket::{send_to, recv_from}
methods are no longer generic over Buf
or MutBuf
but instead take slices directly. The return types have also been updated to return the number of bytes transferred. (#260)ready
event (#184)