Commit Graph

1278 Commits

Author SHA1 Message Date
Thomas de Zeeuw 06efaeb48f Don't leak fds on error in UDS on Unix
We do this by simply creating a fd-managing type, e.g. UnixDatagram,
from the fd once it's created.

Also first tries to parse the path as that can fail without doing a
system call.
2022-11-30 16:07:41 +00:00
Anthony Ramine db6dc6c66e Release v0.8.5
Co-authored-by: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
2022-10-24 17:15:52 +00:00
Alexis (Poliorcetics) Bourget 618ac9a378 deps: update to windows-sys 0.42.0 2022-10-22 19:29:48 +00:00
Thomas de Zeeuw 35aa5580a5 Fix clippy warnings (#1617) 2022-09-05 11:05:17 +02:00
Russell Haley c1510f99a1 Round nonzero <1ms timeouts to 1ms for Windows too 2022-09-03 15:18:34 +00:00
yump 436aef4b26 Round up when converting timeout to ms for epoll_wait() 2022-09-03 14:34:30 +00:00
Thomas de Zeeuw 0b344747e7 Document the current Poll::poll timeout behaviour 2022-08-11 11:00:48 +00:00
Alex Touchet 110801e474 Switch to GitHub Actions badge (#1601) 2022-08-05 18:56:07 -05:00
Thomas de Zeeuw 7b8cb18b94 Remove Azure pipeline CI
Moved to GitHub Actions.
2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 83fb2e3faf Add Passed job to CI
This will be the only job required to succeed to merge a pr.
2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 17b0ec4455 Run CI on v0.6.x and v0.7.x branches 2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 4ad336d4e2 Add nightly check to CI 2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 77eb2c805d Add MSRV check to CI 2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 859fed6288 Run tests in release profile 2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 1abc6ddf30 Compile Cargo hack using debug profile
The performance of it doesn't really matter much.
2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 78068caec2 Install Cargo-hack in CheckTargets 2022-07-19 21:45:35 +00:00
Thomas de Zeeuw c63cc7093b Switch to nightly compiler for MinimalVersions
Required due to the use of -Zminimal-versions.
2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 16b5532ce3 Add more targets to Makefile
Adds:
 * arm-linux-androideabi
 * i686-unknown-linux-gnu
 * x86_64-apple-ios
 * x86_64-unknown-redox

Since we use this in GitHub Actions we'll need to match the targets of
Azure CI.
2022-07-19 21:45:35 +00:00
Thomas de Zeeuw 267a404713 Add GitHub Actions
Should move over all of the Azure CI checks.
2022-07-19 21:45:35 +00:00
Thomas de Zeeuw d360cc5e7b Drop support for Wine 2022-07-19 08:46:49 +00:00
Thomas de Zeeuw db3f2505af Fix epoll O_CLOEXEC usage
Switched O_CLOEXEC and EPOLL_CLOEXEC around in the last commit.
2022-07-18 20:23:29 +00:00
Thomas de Zeeuw c4e4e0cef8 Cleanup epoll_create fallback
Now allows the fallback on all platforms, if we doing one why not all?

Also properly closes the file descriptor if the fcntl call fails.
2022-07-17 21:44:22 +00:00
Thomas de Zeeuw 6800c2f7fb Remove quote from TARGETS
Not required, Make handles this for us.
2022-07-17 21:44:22 +00:00
link2xt 43aa8c5589 Use raw system call for epoll_create1() on Android
Using epoll_create() as a fallback.

Fix #1473.
2022-07-17 19:44:35 +00:00
bestgopher 0f6d1b8854 style(examples): use would_block and remove set_nonblocking 2022-06-27 09:48:34 +00:00
Thomas de Zeeuw cda23367f1 Release v0.8.4 2022-06-19 17:09:50 +00:00
Thomas de Zeeuw 93c67c859e Log a warning when polling without subscriptions
On WASM/WASI.
2022-06-19 17:07:44 +00:00
Thomas de Zeeuw 19f8d02904 Add docs about polling without registering event sources
This mainly concerns WASM/WASI.
2022-06-19 17:07:44 +00:00
Richard Zak 8185e426c7 fix: don't try_clone() a debug-only field
Signed-off-by: Richard Zak <richard@profian.com>
2022-06-15 21:25:45 +00:00
Tricster 6f99bc9104 Fix typo in example.
Signed-off-by: Tricster <mediosrity@gmail.com>
2022-06-09 08:01:35 +00:00
Richard Zak 1155f86396 Support Registry::try_clone on wasm32-wasi
Signed-off-by: Richard Zak <richard@profian.com>
2022-06-04 19:15:08 +00:00
Sergey Ukolov 94f9ae32a2 Fix typo in changelog 2022-06-02 20:09:08 +00:00
Thomas de Zeeuw f94f594f53 Release v0.8.3 2022-05-08 15:48:54 +00:00
Alan Somers 89f2ea0195 If we're going to use mem::zeroed, we might as well use it. 2022-05-08 15:33:49 +00:00
Alan Somers 6aa97178a7 Future-proof the kevent ABI
FreeBSD 12 adds some new private fields to struct kevent, and it changes
the type of "data" from intptr_t to i64.  For now libc only binds the
11-compat ABI, but that will change some day.  Adjust mio's structure
definitions for compatibility with either ABI.

This should work on all 32 and 64 bit platforms.
2022-05-08 15:33:49 +00:00
Alex Touchet e1edcb60bf chore: update http links in docs to https (#1571) 2022-05-03 18:06:55 -05:00
Alex Touchet e3680a90b0 Relax windows-sys dependency version 2022-05-03 08:34:43 +02:00
Thomas de Zeeuw fc0076a92b Use SIO_* constants defined in windows-sys 2022-04-28 10:09:09 +02:00
Thomas de Zeeuw ffa0ca57c6 Update to windows-sys 0.36
Removes the need for the Win32_NetworkManagement_IpHelper feature as
AF_INET and AF_INET6 are now included in the Win32_Networking_WinSock
feature.
2022-04-28 10:09:09 +02:00
Alan Somers 645e1a6720 Update CI image to FreeBSD 12.3. 12.2 is EoL. 2022-04-14 17:50:09 +02:00
Thomas de Zeeuw 9c5e049633 Improve docs for WouldBlock connection failures 2022-04-11 16:50:59 +02:00
Thomas de Zeeuw 8ba218a520 Document connect calls can return a WouldBlock error
This is a reflect of the Linux manual, which unfortunately doesn't
specify how to determine when the connect call should be retried.
2022-04-11 16:50:59 +02:00
Thomas de Zeeuw 6e7e2db1dc Don't ignore EAGAIN in UDS connect call
Per the Linux manual:
> EAGAIN For nonblocking UNIX domain sockets, the socket is
>        nonblocking, and the connection cannot be completed
>        immediately.

Previously the code incorrectly assumed that the connection was now in
progress, which is incorrect. If that were the case EINPROGRESS
would/should be returned by the OS
2022-04-11 16:50:59 +02:00
Kezhu Wang 6e08610f4f Fix incorrect rustdoc for TcpStream::connect 2022-04-10 16:49:55 +02:00
Jake Shadle e039bd8973 Note issue for adding SIO_* constants 2022-03-31 10:34:52 +02:00
Jake Shadle 8a74ea3f7b Oops 2022-03-31 10:34:52 +02:00
Jake Shadle c221b1c627 Use Win32_NetworkManagement_IpHelper feature 2022-03-31 10:34:52 +02:00
Jake Shadle 65530c7559 Remove nested imports 2022-03-31 10:34:52 +02:00
Jake Shadle f315ade2f8 Clarify undocumented NT function 2022-03-31 10:34:52 +02:00
Jake Shadle 97355e6c2c Loosen version restriction 2022-03-31 10:34:52 +02:00