Commit Graph

3279 Commits

Author SHA1 Message Date
Benjamin Saunders 0ba3461a6d Strip down ConnectionEvent to reflect its sole remaining purpose 2023-06-25 12:10:54 -07:00
Benjamin Saunders 8e6401a27a Notify endpoint of drained connections synchronously 2023-06-25 12:10:54 -07:00
Benjamin Saunders 77e0866aca Propagate reset token updates to the endpoint synchronously 2023-06-25 12:10:54 -07:00
Benjamin Saunders 473f5dab56 Factor alloc_new_identifiers call into queue_new_cids 2023-06-25 12:10:54 -07:00
Benjamin Saunders 00986287ea Retire CIDs synchronously 2023-06-25 12:10:54 -07:00
Benjamin Saunders 89507692f3 Request CIDs from the endpoint synchronously 2023-06-25 12:10:54 -07:00
Benjamin Saunders c114a0c75d Handle proto endpoint events directly in connection drivers 2023-06-25 12:10:54 -07:00
Benjamin Saunders ded8d62b02 Lift proto::Endpoint out of the endpoint driver mutex
Locking the whole thing is no longer necessary now that Endpoint uses
interior mutability.
2023-06-25 12:10:54 -07:00
Benjamin Saunders 757043d476 Adopt interior mutability pervasively in proto::Endpoint
Allows a single `Endpoint` to be manipulated by multiple threads in
parallel, unlocking new possibilities for horizontal scaling.
2023-06-25 12:10:54 -07:00
Benjamin Saunders 53cf3d97d2 Move side effects out of add_connection
Unblocks interior mutability of the index and connections fields.
2023-06-25 12:10:54 -07:00
Benjamin Saunders 41a2a97290 Use the thread-local RNG in Endpoint 2023-06-25 12:10:54 -07:00
Benjamin Saunders 2268487c1f Require CID generators to be internally thread-safe 2023-06-25 12:10:54 -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 65bbb1e154 Update obsolete doc comment 2023-06-04 07:44:53 +02:00
Benjamin Saunders c1d412c7aa Bump versions to reflect API breakage 2023-06-03 14:58:29 -07:00
Benjamin Saunders b73ed0b73a Rename issue_cids to issue_first_cids to better reflect its role 2023-06-03 14:58:29 -07:00
Benjamin Saunders 6d2d9fda4c Allocate persistent connection IDs immediately when generated
Guards against future bugs where multiple (e.g. concurrent) calls to
`new_cid` might otherwise lead to an undetected collision.
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
Benjamin Saunders 97ccc4f611 Factor connection lookup out into a dedicated struct 2023-06-03 14:58:29 -07:00
Benjamin Saunders 85d9a5c6c9 Remove redundant/obsolete Endpoint::reject_new_connections
This was previously used by the `quinn` layer to stop accepting
connections when the `Incoming` stream was dropped. That stream has
since been replaced by an async function. Users who still want this
can use set_server_config directly.
2023-06-03 14:58:29 -07:00
Benjamin Saunders 1373443ad0 Fix invalid CIDs being ignored when using zero-length CIDs 2023-06-03 14:58:29 -07:00
Benjamin Saunders 23ad201255 Fix obsolete debug struct name 2023-06-03 14:58:29 -07:00
Benjamin Saunders fb91cf4706 Reduce ConnectionId copying 2023-06-03 14:58:29 -07:00
Dirk Stolle a604759336 Replace unmaintained actions-rs/* actions in CI workflows
Basically all of the `actions-rs/*` actions are unmaintained. See
<https://github.com/actions-rs/toolchain/issues/216> for more
information. Due to their age they generate several warnings in
CI runs.

To get rid of those warnings the occurrences of
`actions-rs/toolchain` are replaced by `dtolnay/rust-toolchain`,
and the occurrences of `actions-rs/cargo` are replaced by direct
invocations of `cargo`.
2023-06-02 14:35:20 -07:00
Dirk Stolle c3aef84315 Extend Dependabot configuration to keep GitHub Actions up to date 2023-06-02 22:59:53 +02:00
Alexandre Seo 33e3f1603b Use fullchain.pem in the certbot example 2023-05-27 10:50:45 -07:00
Samuel Moelius ede43442f2 Allow compilation with --cfg fuzzing but not --features=arbitrary 2023-05-27 07:57:21 +02:00
Dirk Stolle 0c6b743f18 Update actions/checkout in GitHub Actions workflows to v3 2023-05-23 17:29:52 -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. 0.10.1 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
ljedrz c0b9d4233e docs: update the MSRV in the README
Signed-off-by: ljedrz <ljedrz@gmail.com>
2023-05-11 14:49:44 +02:00
Benjamin Saunders 044eab53ff Update clap 2023-05-11 14:10:19 +02:00
Dirkjan Ochtman a66ee19797 Only check libraries against MSRV 0.10.0 2023-05-11 04:47:59 +02:00
Dirkjan Ochtman 1dd88e6883 Update remaining crates to 2021 2023-05-11 04:47:59 +02:00
Dirkjan Ochtman 92ab791486 Upgrade socket2 to 0.5 2023-05-11 04:47:59 +02:00
Dirkjan Ochtman 9e26ea98bd Fix visibility warnings on non-Unix platforms 2023-05-11 04:47:59 +02:00
dignifiedquire 7d006c0d58 switch to Bytes to allow cheap cloning 2023-05-09 17:15:40 +02:00
dignifiedquire d08ad01e40 perf: specialize slice extension in Datagram::encode 2023-05-09 17:15:40 +02:00
dignifiedquire 89b527c9a1 feat: use BytesMut for Transmit content 2023-05-09 17:15:40 +02:00
Maksim Vykhota 37e7b742cb Fail FreeBSD CI if any step fails 2023-05-06 11:29:28 -07:00
Maksim Vykhota aeda2e2146 Fix build and tests on FreeBSD 2023-05-06 11:06:43 -07:00
Benjamin Saunders a55fd51c95 Delete redundant set_socket_option 2023-05-06 08:05:17 +02:00
Benjamin Saunders 092a7686a4 Enable PMTUD by default when appropriate 2023-05-06 08:05:17 +02:00
Benjamin Saunders f4384e6edb udp: expose whether IP_DONTFRAG semantics apply 2023-05-06 08:05:17 +02:00
Benjamin Saunders 23b1416a01 udp: improve fragmentation suppression on *nix 2023-05-06 08:05:17 +02:00