Commit Graph

1205 Commits

Author SHA1 Message Date
Thomas de Zeeuw fde5a334bb Release v0.8.0 2021-11-13 13:18:07 +01:00
Thomas de Zeeuw 0e8834098f Fix Clippy warning 2021-11-13 13:18:07 +01:00
Thomas de Zeeuw 4ac616ebf3 Add changelog for v0.8 2021-11-07 23:46:11 +01:00
Thomas de Zeeuw b6cafa9cd9 Add v0.7.14 change log
From commit 064af846f3c2c99ce1f1a47760aa795cfa43b9ad
2021-11-07 23:46:11 +01:00
Thomas de Zeeuw ccb07ee209 Fix feature flags for some tests files
The test util module requires both the "os-poll" and "net" features.
2021-11-07 19:42:00 +01:00
Thomas de Zeeuw 31913f4e72 Remove cfg attributes for Solaris
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.
2021-11-07 19:42:00 +01:00
Thomas de Zeeuw 33712fdc88 Add section about raw fd to portability guidelines 2021-11-07 19:40:11 +01:00
Thomas de Zeeuw 24c3a7d3f4 Add note about short receive on datagram sockets
Talking about the differences between OSs.
2021-11-07 19:40:02 +01:00
Thomas de Zeeuw 08e2bf4ca0 Document unconnected TcpStream returned by TcpStream::connect 2021-11-07 10:53:51 +01:00
Thomas de Zeeuw c6fc16df34 Deregister connection before dropping it in TCP example 2021-11-07 10:47:51 +01:00
Thomas de Zeeuw 4aa2ed73d6 Document that Mio report OOB data in Event::is_readable
Reporting Out-of-band (OOB) as readable it could leave applications open
to DoS attacks. However because Mio uses edge-triggers most applications
won't actually be effected.
2021-11-06 17:17:30 +01:00
Thomas de Zeeuw 70968b50c9 Fix match_like_matches_macro Clippy lint
We've updated our MSVR since the comment above it.
2021-11-06 17:17:30 +01:00
Thomas de Zeeuw d7ca179f46 Update Rustc nightly version in CI 2021-11-06 17:17:30 +01:00
Ben Noordhuis 597f6c436d Add sys::unix::SocketAddr::as_abstract_namespace()
Fixes #1517.
2021-10-16 16:33:35 +02:00
Thomas de Zeeuw c1979d80cf Update change log with v0.7.x releases
Contains the work in the following commits:
 * v0.7.8 20b7298fe0d3da04b965ec4a379db0247cd632be.
 * v0.7.9 07bc32f27b4f2488de91a66cfd489eae97551635.
 * v0.7.10 b7006d710821f1d6aa0d5a63948dc21b4433ddbf.
 * v0.7.11 772c692150c711d7bdd72b5c6287072b8914e519.
 * v0.7.12 7adfb75fdefe98e3b57438bafa36c09a85377777.
 * v0.7.13 75f41fb304d299dfbc07679d15193e03273c4597.
2021-10-08 13:27:06 +02:00
Thomas de Zeeuw d899ed686b Install nightly Rust on CI for install cargo-hack 2021-10-08 13:17:03 +02:00
Thomas de Zeeuw 17552034f5 Install Cargo-hack using nightly on CI
Cargo-hack's (transient) dependency bitflags has updated its MSRV.
2021-10-08 13:17:03 +02:00
Thomas de Zeeuw 754edfb56f Fix Clippy warnings on Windows
Seems this isn't check on the CI.
2021-10-08 13:17:03 +02:00
Thomas de Zeeuw 0207bc6bd7 Fix Clippy warnings 2021-10-08 13:17:03 +02:00
Thomas de Zeeuw 18b49bd565 Fix dead_code warnings for Windows 2021-10-08 13:17:03 +02:00
Thomas de Zeeuw cd223b6ea8 Remove TcpSocket type
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.
2021-10-08 13:17:03 +02:00
Rémi Lauzier 2a9028a6e1 Update dev-dependencies 2021-07-06 18:21:17 +00:00
Thomas de Zeeuw 84393bbff8 Change port in connect_error
Hopefully this port is actually not used.

Also check Event::is_write_closed since we expect that to be true.
2021-07-03 17:06:27 +02:00
Jake Shadle 9cc0a85157 Move wine from unsupported 2021-07-03 12:51:54 +02:00
Ivan Enderlin 6a5e2299e2 chore: Make Clippy happy (bis). 2021-06-26 23:29:02 +02:00
Ivan Enderlin fe49ca5c30 chore: Make Clippy happy. 2021-06-26 23:29:02 +02:00
Ivan Enderlin c9dafc1fec feat: Move poll::selector to Registry::selector. 2021-06-26 23:29:02 +02:00
Thomas de Zeeuw c5351ba6b9 Fix Selector::try_clone
Calls fcntl F_DUPFD_CLOEXEC expects two arguments; the command
(F_DUPFD_CLOEXEC) and an argument for the command. In this case an lower
bound for the resulting file descriptor. Because we didn't provide a
value it would take whatever value was left in the register from
whatever code used it before the system call.

This caused Waker::new to fail, see issue
https://github.com/tokio-rs/mio/issues/1497.
2021-06-14 20:56:15 +02:00
Thomas de Zeeuw ffb3b17da0 Set FD_CLOEXEC flag on duplicated kqueue Poll
Same as commit 49c2ce21d3, but for kqueue.
2021-06-14 20:56:15 +02:00
Tim Zhang 49c2ce21d3 Set the close-on-exec flag for the duplicate epoll_fd
The close-on-exec flag (FD_CLOEXEC; see fcntl(2)) for the
duplicate descriptor created by dup(2) is off.

We can use fcntl + F_DUPFD_CLOEXEC to dup the epoll_fd to fix this
issue.

Fixes: tokio-rs/tokio#3809

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-06-09 15:47:15 +00:00
Taiki Endo 139c144e2f Use ubuntu-18.04 instead of ubuntu-16.04 2021-06-09 15:46:57 +00:00
cdcode 2ae3b3d74c Small spelling correction in example 2021-06-09 15:45:10 +00:00
Thomas de Zeeuw be018016a0 Update outdated comment 2021-05-13 15:22:27 +00:00
Thomas de Zeeuw 8dc059768d Replace x86_64-sun-solaris with x86_64-pc-solaris
https://github.com/rust-lang/rust/pull/82216 removed the
x86_64-sun-solaris target from rustup, changing it to use
x86_64-pc-solaris instead.

Related issues:
 * https://github.com/rust-lang/rust/issues/85098
2021-05-13 15:22:27 +00:00
Thomas de Zeeuw d3380f47a2 Avoid cast pointers to usize in windows::NamedPipe
Changes the Inner::ptr_from_* methods to use ptr::wrapping_sub rather
then casting to usize.
2021-05-13 15:22:27 +00:00
Thomas de Zeeuw e4e4365fe1 Replace offset constants with methods in Windows NamedPipe 2021-05-13 15:22:27 +00:00
Thomas de Zeeuw 2f30783a79 Reorder NamedPipe fields
Moving the Overlapped fields to the start to make it easier to determine
the offsets and hopefully incur less breakage once external fields
change size.

Note that the Overlapped fields internally uses miow::Overlapped, which
in turn is a OVERLAPPED struct as found in the winapi crate and has a
stable layout (as defined by the Windows API).
2021-05-13 15:22:27 +00:00
Thomas de Zeeuw 365fa2085f Remove unsound offset_of macro
And replace it with constants that define the offsets to the fields.
It's not a pretty solution, but it's one without UB.
2021-05-13 15:22:27 +00:00
Rob Ede 948ef6ea9d remove manual doc versioning 2021-04-01 16:10:05 +00:00
Rob Ede e8abccf445 use unspecified wording in some docs 2021-04-01 16:10:05 +00:00
Thomas de Zeeuw 1168df9fba Update rustc nightly version on CI 2021-03-30 12:01:00 +00:00
Ivan Enderlin 6c4c099f18 test: Fix usage of panic!. 2021-03-30 12:01:00 +00:00
Ivan Enderlin 6b5f761911 test(sys) Doctest imports unix::SourceFd which is behind the os-ext feature.
This patch fixes this doctest. It imports `mio::unix::SourceFd`, but
the `mio::unix` module exists if and only if the `os-ext` feature is
enabled.
2021-03-30 12:01:00 +00:00
Émile Grégoire eea13df15a Add missing mstcpip feature flag to winapi dependency. 2021-03-22 21:41:21 +00:00
Simonas Kazlauskas 3d90b7e4a9 Fix an instance of not doc(cfg(.*))
This unbreaks the CI in another crates that use
`RUSTDOCFLAGS=--cfg=docsrs` to verify correctness of their own things. I
wonder why docs.rs itself does not fail on this though.
2021-03-15 18:32:04 +00:00
Thomas de Zeeuw 2d422c6139 Add unsupported section to readme
And add Haiku and Wine to it.
2021-03-12 09:41:31 +00:00
Thomas de Zeeuw 15f27c7556 Add a note about require Android API level 21 2021-03-11 14:31:56 +00:00
AIkorsky dee260af65 Fix error handling in NamedPipe::write 2021-02-22 21:12:36 +00:00
Chuck Musser df3be33e2a DragonFlyBSD: refine kqueue-related types and values
- Make sure that Filter and Flag types are defined. The sizes
  for these kevent fields are the same as on FreeBSD and OpenBSD

- Don't define the NOTE_BACKGROUND EVFILT_TIMER flag. This flag
  value is exclusive to Apple platforms.
2021-02-17 19:22:15 +00:00
Thomas de Zeeuw 9083f24cb3 Use SO_LINGER_SEC on macOS for TcpSocket::set/get_linger 2021-02-09 21:18:38 +00:00