Commit Graph

3196 Commits

Author SHA1 Message Date
Benjamin Saunders 32c80cca47 Portable delay queue 2023-03-04 16:00:43 -08:00
Benjamin Saunders aa92ba963d Move timer handling into an isolated method 2023-03-04 15:39:13 -08:00
Benjamin Saunders d38ec466cf Remove unnecessary sharing of UdpState 2023-03-04 15:39:13 -08:00
Benjamin Saunders f8a823434e Unify connection/endpoint drivers 2023-03-04 15:39:13 -08:00
Benjamin Saunders 1200f91c1c Dispatch connection events synchronously 2023-03-04 15:39:13 -08:00
Floris Bruynooghe dfc1f33886 better wording 2023-02-28 16:40:50 -08:00
Floris Bruynooghe 03f615ab05 Properly fix up example code 2023-02-28 16:40:50 -08:00
Floris Bruynooghe 06e1a1a8c5 Update quinn/src/recv_stream.rs
Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com>
2023-02-28 16:40:50 -08:00
Floris Bruynooghe b95e50fb1f Update quinn/src/recv_stream.rs
Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com>
2023-02-28 16:40:50 -08:00
Floris Bruynooghe 162032d184 improve description of effect of calling stop 2023-02-28 16:40:50 -08:00
Floris Bruynooghe b833c0e626 Remove EOF terminology completely 2023-02-28 16:40:50 -08:00
Floris Bruynooghe 9f6f6e78e0 Use read_to_end 2023-02-28 16:40:50 -08:00
Floris Bruynooghe 01fa7a4eaa improve wording, correct example 2023-02-28 16:40:50 -08:00
Floris Bruynooghe 69348e54f1 Apply suggestions from code review
Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com>
2023-02-28 16:40:50 -08:00
Floris Bruynooghe 88bf165b1f Document how to close a stream correctly
It is not trivial to correctly close a stream without errors and
knowing everything is fully acknowledged.  Describe some details
around this.
2023-02-28 16:40:50 -08:00
Dirkjan Ochtman f4ecf1baab Add comment about outdated dependency 2023-02-27 07:34:35 +01:00
Dirkjan Ochtman cbe4b4604d Consistently set rust-version in Cargo metadata 2023-02-27 07:34:35 +01:00
Dirkjan Ochtman 3cc7efbe55 Apply remaining clippy suggestions from clippy 1.67 2023-02-27 07:34:35 +01:00
Dirkjan Ochtman f7354ef6ac Inline format arguments 2023-02-27 07:34:35 +01:00
Max Inden c17315fa10 docs(quinn): remove restriction to tokio
With https://github.com/quinn-rs/quinn/pull/1364 `quinn` is no longer restricted
to `tokio`. Commit updates the crate heading accordingly.
2023-02-24 10:34:34 -08:00
Damien Deville 390f2ebeba Add a special crypto session to perf binaries to disable packet
encryption / decryption. It can be enabled using --no-protection
command line option. This can be use when doing performance
tests to reveal other hotspots than packet encryption and
decryption.
2023-01-26 22:47:53 -08:00
Dezhi Wu 6e1442370b Fix usage message 2023-01-26 22:38:52 -08:00
Benjamin Saunders d00a71c695 Improve error when connecting with an unsupported version
If the cryptographic layer supports a version not in the local
endpoint's supported versions list, a connection could have been
initiated with that version for which all packets returned by a
compatible peer would hav ebeendropped. This is a relatively easy
configuration error to make.
2023-01-24 22:06:21 -08:00
dependabot[bot] e5a5d3eeb8 Update windows-sys requirement from 0.42.0 to 0.45.0
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.42.0...0.45.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 15:14:36 +01:00
Benjamin Saunders af4c4caeb2 Fix racy Endpoint::wait_idle 2023-01-08 06:37:22 +01:00
XOR-op c88a6ecd7b reexport whole quinn-udp module 2023-01-07 21:59:19 +01:00
XOR-op 50a474d7ab reexport udp::{RecvMeta, UdpState} for AsyncUdpSocket 2023-01-07 21:59:19 +01:00
Benjamin Saunders 49cdfa553e Route logs via log crate by default when tracing isn't used 2022-12-24 21:37:50 +01:00
Benjamin Saunders 05dabf17f8 Fail gracefully on attempts to connect to an unspecified IP address 2022-12-24 21:19:59 +01:00
Dirkjan Ochtman 2c6aa43610 Apply clippy suggestions from Rust 1.66 2022-12-19 10:13:01 -08:00
Dan Shields 088f244e2a Update deny.toml
https://github.com/qnighy/yasna.rs/issues/63 is resolved
2022-12-18 22:13:01 -08:00
Zicklag dea7f84a22 Update Wording About Quick Being a Draft 2022-12-13 10:24:13 +01:00
StygianLightning 389d7ce506 Remove unnecessary casts. 2022-12-10 11:07:03 -08:00
StygianLightning 943b78cbd1 Use Box::default() 2022-12-10 11:07:03 -08:00
StygianLightning 019affdf9f Use clamp instead of a local re-implementation. 2022-12-10 11:07:03 -08:00
StygianLightning 0d366990f1 Removed an obsolete lint control annotation.
The lint issue that made the workaround necessary has been resolved.
2022-12-10 11:07:03 -08:00
StygianLightning b170993bd1 Fixed a typo. 2022-12-10 11:07:03 -08:00
Benjamin Saunders 7d1b280f55 Bump versions 0.9.3 2022-12-05 22:37:28 +01:00
Benjamin Saunders c794cc9138 Respect max_udp_payload_size transport parameter
This has no effect with our default minimal MTU, but if the MTU is
configured higher manually it's required for conformance.
2022-12-05 02:57:54 -08:00
Dirkjan Ochtman fd845b0c64 udp: add safe wrapper for setsockopt() 2022-12-02 10:49:06 -08:00
lucifer9 166e0fb60a Fix build on FreeBSD, add CI test for FreeBSD, set IPV6_RECVPKTINFO on FreeBSD & macOS, set IP_RECVDSTADDR on FreeBSD and macOS only for IPv4, fix a warning about unused state: &UdpState, allow different types for the 3rd argument to sendmmsg()/recvmmsg() 2022-12-02 02:33:38 -08:00
Brandon Williams 9f50319421 send-stream: rely on cleaning up waker for Stopped in SendStream Drop impl 2022-11-29 15:26:15 -08:00
Brandon Williams 70ef5039e9 recv-stream: clean up any previously register wakers when RecvStream is dropped 2022-11-29 15:26:15 -08:00
Brandon Williams f6ae67e2fa send-stream: clean up any previously register wakers when SendStream is dropped 2022-11-29 15:26:15 -08:00
Brandon Williams 7ba0acb8da send-stream: unregister waker when Stopped is dropped 2022-11-29 11:35:34 -08:00
Brandon Williams 1122c627c3 connection: wake 'stopped' streams on stream finish events
In the event that the SendStream Stopped future is polled once and then dropped
before the remote side has stopped the stream, and instead the stream
has been finished, the waker registered in the connection stopped map is
never removed and is effectively "leaked" until the connection is
closed. This can lead to a large amount of memory being retained when a
connection is very long lived and many streams are used over the life of
that connection.
2022-11-29 11:35:34 -08:00
Benjamin Saunders cfb7a067ee Bump version 0.9.2 2022-11-28 20:27:12 -08:00
Benjamin Saunders 478445ea71 Fix panic on concurrent read_datagram completion
The previous logic assumed that a datagram must be available if the
future was notified, but this might not be the case if e.g. two
futures are concurrently waiting for datagrams, but only one datagram
has been received, since we use notify_waiters to wake all waiting
futures to be robust in the face of cancellation.
2022-11-28 20:27:12 -08:00
Benjamin Saunders 5c7f7aabfa Allow initial MTU to be specified in bulk benchmark 2022-11-27 21:23:24 -08:00
Damien Deville 78401c614f Fix GSO / GRO auto detection when IPv6 is disabled. 2022-11-23 10:23:06 -08:00