To trigger Event::is_priority on Linux and Android.
In the future we might want to include EV_OOBAND for kqueue, but that
seems to be Apple only (FreeBSD and OpenBSD don't implement it at
least).
Co-authored-by: Lars Pöschel <lars.poeschel@edag.com>
This updates miow to 0.4, which now uses the windows-sys crate instead
of winapi, as the former is maintained and updated frequently as opposed
to winapi. The windows-sys crate also covers more of the Windows API
surface, which also allowed me to remove the dependency on ntapi (as it
still depends on winapi). There was only a single function,
`NtCancelIoFileEx` that was present in ntapi but not windows-sys, so I
merely added the extern declaration in the one place it was used as it
is not worth bringing in a dependency just for that.
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.