Commit Graph

761 Commits

Author SHA1 Message Date
Benjamin Saunders 3e7c8fda96 Pass proto-layer connection events internally
Groundwork for replacing generic message-passing with lighter
event-representation-aware communication strategies.
2023-12-18 11:31:22 -08:00
Benjamin Saunders 253eba94d1 Replace dummy message with direct wake to trigger endpoint events 2023-12-18 11:31:21 -08:00
Benjamin Saunders 91bc3a49be Switch to AtomicWaker to wake the endpoint driver
Groundwork for direct connection -> driver wake-ups, and yields one
less piece of state inside a monolithic mutex.
2023-12-18 11:31:21 -08:00
Benjamin Saunders 5a8483baec Pass proto-layer endpoint events internally
Groundwork for replacing generic message-passing with lighter
event-representation-aware communication strategies.
2023-12-18 11:28:46 -08:00
Benjamin Saunders 302b3369bf Don't write out Default manually 2023-12-17 13:14:23 -08:00
Benjamin Saunders 5eac310a5f Don't plumb current time through endpoint events
This was only needed to determine the base time for the next
CID retirement timer, for which the marginal delay caused by fetching
a new `Instant::now()` on demand is harmless.
2023-12-17 12:44:27 -08:00
James Leitch e77cd3e33d Updates docs for Connection::accept_bi() and Connection::open_bi() 2023-11-10 21:49:56 +01:00
Luís Neto 49aa4b61e0 #729: proto: write outgoing packets to caller-supplied memory (#1697) 2023-11-01 12:17:10 -07:00
Fabio Valentini 10f08e0652 ensure LICENSE files are present in all published crates 2023-10-28 17:26:10 +02:00
dependabot[bot] 6d80efeeae Update async-io requirement from 1.6 to 2.0
Updates the requirements on [async-io](https://github.com/smol-rs/async-io) to permit the latest version.
- [Release notes](https://github.com/smol-rs/async-io/releases)
- [Changelog](https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-io/compare/v1.6.0...v2.0.0)

---
updated-dependencies:
- dependency-name: async-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 15:58:29 +02:00
Michael Chen dd34d57a0a Make quinn-proto::{Connection, Endpoint} deterministic (#1691)
`quinn-proto::{Connection, Endpoint}` structs call
`StdRng::from_entropy()` in their implementation. It makes it hard to
reproduce errors in an otherwise deterministic test case.

This PR addresses the issue by adding a `StdRng` argument to the
respective `new` functions. For other functions that may create an
endpoint/connection, an argument of type `impl FnOnce() -> StdRng` is
added. This avoids eager calls to generate fresh entropy. e.g. the
`Endpoint::handle` function is frequently called but we'd only need the
rng when handling a new incoming connection.
2023-10-23 11:46:15 +02:00
Dirkjan Ochtman 7bd92f65aa Avoid redundant link target in docs 2023-10-23 11:42:54 +02:00
Benjamin Saunders e51f848296 Bump MSRV to 1.65 for let-else 2023-09-24 14:22:14 -07:00
Romain Vimont e5bf98c3d7 Pass byte read count to FinishEarly
If read_exact() finishes early (end of stream), report the number of
bytes actually read.

Fixes #1663
2023-09-20 12:18:42 -07:00
Damien Deville a7a3c4da6a Add missing export for proto::AckFrequencyConfig. 2023-08-29 16:25:32 +02:00
Dirkjan Ochtman 307d80b939 proto: make now explicit for Endpoint::connect() 2023-08-25 11:55:43 -07:00
Benjamin Saunders 6d4830eaef Fix client/server tracing span placement in echo_* tests
These must enclose the endpoint construction and connect calls.
2023-08-21 19:10:38 -07:00
Benjamin Saunders 13db6076a3 Propagate current tracing span to spawned connection drivers
For clients, this is the span that was current when the connection
attempt was initiated; for servers, it is the span of the endpoint
task, which is the span that was current when the endpoint was
constructed.
2023-08-21 19:10:38 -07:00
JieLiang Ma 7b72b71c2f Move function may_fragment() from lib quinn-udp to UdpSocketState. 2023-08-15 13:40:54 +02:00
Dirkjan Ochtman 4f25f501ef udp: simplify socket state initialization 2023-08-11 11:49:09 -07:00
Floris Bruynooghe 532ba7d804 Preserve the tracing span in the EndpointDriver task
The EndpointDriver is spawned in a task.  Unless the span is copied
into this task the current span is lost.

Copying the current span means any tracing calls inside the driver,
from e.g. a custom AsyncUdpSocket, are preserved in the span.  This
makes it easy to use different parent spans for different endpoints
and have log messages appear with their parent span.  Otherwise these
log messages are not attached to a span.
2023-07-27 16:12:49 -07:00
Benjamin Saunders 4973c4ab29 Bump quinn-udp version 2023-07-24 16:35:51 -07:00
Benjamin Saunders f15d837578 Fold UdpState into UdpSocketState
Simplifies the quinn-udp API, and helps isolate internal complexity to
the platforms that need it.
2023-07-24 16:35:51 -07:00
Benjamin Saunders 3eb23bc730 Fold UdpState into AsyncUdpSocket
Allows knowledge of UdpState to be isolated entirely within
AsyncUdpSocket implementations, simplifying quinn::Endpoint and the
poll_send API, and exposing more control over UDP feature checks to
implementers.
2023-07-24 16:35:51 -07:00
Jonatan Hatakeyama Zeidler 0ae7c60b15 Reexport rustls crate 2023-07-17 12:00:39 -07:00
Lijun Wang e652b6d999 Suppress stateless packets when endpoint transmit queue is large 2023-07-06 14:10:04 -07:00
tim gretler 6d3958fce5 make new_with_abstract public again 2023-06-30 09:58:14 +02:00
tim gretler a8c17a3e17 merge converged endpoint constructors 2023-06-30 00:11:15 -07:00
tim gretler 35089ee1c8 use boxed udp socket 2023-06-30 00:11:15 -07:00
dependabot[bot] 790ff720a9 Update rcgen requirement from 0.10.0 to 0.11.1
Updates the requirements on [rcgen](https://github.com/est31/rcgen) to permit the latest version.
- [Changelog](https://github.com/est31/rcgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/est31/rcgen/compare/v0.10.0...v0.11.1)

---
updated-dependencies:
- dependency-name: rcgen
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 16:20:46 +02:00
Benjamin Saunders 7914468e27 Merge redundant impl Connecting blocks 2023-06-12 14:12:15 -07:00
Benjamin Saunders 926f927135 Fix panic on redundant finish calls 2023-06-12 14:12:15 -07:00
Jonathan Johnson 98f5fe2a3f Added Endpoint::reject_new_connections (#1585)
This commit adds a new function that refuses new connections without
impacting existing connections. Internally, this just sets the
connection limit to 0, which causes incoming connections to be rejected.
This is the same approach that was taken in 0.8.5 when `Incoming` was
dropped.
2023-06-07 10:15:52 +02:00
Benjamin Saunders c1d412c7aa Bump versions to reflect API breakage 2023-06-03 14:58:29 -07:00
Benjamin Saunders 951761f7e6 Yield endpoint-generated responses directly rather than buffering 2023-06-03 14:58:29 -07:00
Benjamin Saunders 8b67ae483c Move ConnectionHandle into DatagramEvent
Simplifies signatures and prepares for non-connection-related datagram
events.
2023-06-03 14:58:29 -07:00
Dirk Stolle 01e77e0ce6 Fix some typos 2023-05-23 17:29:01 -07:00
Daniel McCarney 4b309cd46b bump quinn, quinn-proto crate versions. 2023-05-11 23:06:29 +02:00
Daniel McCarney 2f72a5b847 deps: remove webpki dependency.
This commit updates the existing Quinn sub-crate dependencies to remove
the explicit `webpki` v0.22 dependency. It's not used by directly
anywhere and can be a transitive dependency through rustls as required.
2023-05-11 23:06:29 +02:00
Benjamin Saunders 044eab53ff Update clap 2023-05-11 14:10:19 +02:00
Dirkjan Ochtman 92ab791486 Upgrade socket2 to 0.5 2023-05-11 04:47:59 +02:00
Benjamin Saunders 092a7686a4 Enable PMTUD by default when appropriate 2023-05-06 08:05:17 +02:00
Benjamin Saunders f79b31babf Bump MSRV to 1.63
More than six months old, and required by time 0.3.20.
2023-04-24 07:58:42 +02:00
link2xt ec7a459174 Bump quinn-udp version to 0.4.0
It includes a fallback for old Linux and Android systems
which do not support setting ECN flag on UDP packets.
2023-04-19 19:50:13 +02:00
Dirkjan Ochtman 297f875065 Duplicate Transmit and EcnCodepoint across -proto and -udp
This removes the dependency from -udp -> -proto, which seems more correct.
2023-04-19 10:59:06 +02:00
Dirkjan Ochtman 3eb26361db quinn: take Arc<dyn Runtime> directly 2023-04-14 16:08:01 -07:00
Dirkjan Ochtman 4fd2df30b0 quinn: warn on unreachable_pub 2023-04-11 10:47:44 +02:00
Dirkjan Ochtman e1674feb92 Warn on clippy's use_self lint 2023-04-05 10:08:26 +02:00
Adolfo Ochagavía 2d48482180 Use PLPMTUD in bench, perf and examples
Sponsored by Stormshield
2023-04-04 17:40:20 -07:00
Adolfo Ochagavía ddc7ee16b5 Implement PLPMTUD
Sponsored by Stormshield
2023-04-04 17:40:20 -07:00