We never really supported Solaris, we pretended it implemented epoll,
but it never did see https://github.com/tokio-rs/mio/issues/1152. As no
one ever committed to being a maintainer for the port I'm removing it
now with this commit.
Instead replace it with illumuos on the CI, which we do support (as it
supports epoll) and for which we do have maintainers.
The socket2 crate provide all the functionality and more. Furthermore
supporting all socket options is beyond the scope of Mio.
The easier migration is to the socket2 crate, using the Socket or
SockRef types.
The migration for Tokio is tracked in
https://github.com/tokio-rs/tokio/issues/4135.
At present, is_write_closed() does not appear to be true on the event
that fires after shutdown() is called. There is already a similar gag
for the tcp_shutdown_client_write_close_event test, so add one here for
now. When support for the native illumos "event ports" polling
mechanism is added, to replace the use of epoll emulation, this can be
revisted.
This commit adds methods for setting `SO_RECVBUF` and `SO_SNDBUF` to
Mio's `TcpSocket` type. It would be nice to eventually expose these in
Tokio, so adding them to Mio is the first step.
See tokio-rs/tokio#3082 for details.
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Adds one new function: unix::pipe, which is a wrapper around the pipe(2)
system call, and two new types: Sender and Receiver, wrappers around the
file descriptors.
This is a port of https://github.com/Thomasdezeeuw/mio-pipe, commit
8c3025edf128e90733e95327d88493887b93fcdd.
This provides `TcpSocket`, a basic API for building a TCP socket. The
goal is not to provide comprehensive coverage of all system options, but
to provide an API for the most common cases.
This is added now as a replacement for the removal of
`TcpStream::connect_std`. The `connect_std` function from v0.6 was used
until now as the strategy to set socket option before obtaining a mio
TcpStream.
Providing some strategy for customizing a `TcpStream` is required for
Hyper to be able to upgrade.
Adds a NamedPipe implementation for windows. It is based on the IOCP API. To
bridge the IOCP model with the readiness model, buffers are maintained
internally. Writes are first written to the internal buffer and the buffer is submitted
to IOCP. The internal read buffer is submitted to IOCP to be filled. Once it is filled
the pipe becomes ready and the user can read from it.
This expands the checks in SelectorId, adding checks for use in
event::Source::{reregister, deregister}.
In addition this moves the SelectorId to the io_source module, as its
the only user.
The types and traits from the bytes crate were only used in two tests
for the UdpSocket. But a Vec<u8> (now) has all the same functionality,
so we don't need the crate anymore.