Dirkjan Ochtman
9a656d2d0b
Enable use of aws-lc-rs instead of ring
2024-09-24 07:33:03 +00:00
Benjamin Saunders
0e9a19665a
Rename UnknownStream to ClosedStream for clarity
2024-05-03 11:52:44 -07:00
Benjamin Saunders
b42e21e74d
Make SendStream::finish synchronous
...
`await`ing on this was error-prone and not very useful, since it gave
little insight into application state, and was redundant to `stopped`.
2024-05-03 11:52:44 -07:00
Dirkjan Ochtman
3be1ab5ab2
Upgrade to rcgen 0.13
2024-04-22 09:45:53 +02:00
Dirkjan Ochtman
a85a4c12ee
Update rustls to 0.23 and ring to 0.17
2024-04-22 09:45:53 +02:00
Dirkjan Ochtman
07e428169b
proto: deduplicate rustls ClientConfig setup
2024-04-22 09:45:53 +02:00
Benjamin Saunders
90a99193a9
Borrow self in read_to_end, rather than consuming
...
Allows `RecvStream::stop` to be called with custom error codes if
`ReadToEndError::TooLong` is encountered.
2023-03-05 08:52:31 +01:00
Dirkjan Ochtman
f7354ef6ac
Inline format arguments
2023-02-27 07:34:35 +01:00
Benjamin Saunders
7d51d2e57e
Remove Incoming stream in favor of Endpoint::accept
2022-10-23 08:18:42 +02:00
Benjamin Saunders
6e4bcbb2fc
Drop NewConnection in favor of simpler API
2022-09-27 11:08:26 +02:00
Dirkjan Ochtman
838ad7c471
config: make ClientConfig fields private
2022-02-27 11:03:31 -08:00
Benjamin Saunders
39d3dadb60
Fix unsound Vec::set_len in test
2022-01-15 08:07:32 +01:00
Benjamin Saunders
510e6789df
Make futures-core dependency optional
...
This was only used to implement Stream, which we don't actually need.
2021-12-29 07:34:22 +01:00
Benjamin Saunders
4f0f77a20d
Fix many_connections test
...
This was calling `Endpoint::connect_with` outside of a tokio runtime
context.
2021-12-29 07:34:22 +01:00
Rouzip
730fdaf723
remove unwrap!
2021-11-01 10:11:35 -07:00
Benjamin Saunders
987a8935a8
Rename ConnectionClosed error variants to ConnectionLost
...
These don't necessarily represent a connection being deliberately
closed by the peer, but rather any error that might lead to connection
loss.
2021-10-30 14:12:03 +02:00
Benjamin Saunders
b923c4c8b0
Pass SocketAddr by value
...
We always consume this by value in the end, and it's a little more
ergonomic.
2021-10-29 20:12:45 +02:00
Benjamin Saunders
5d1b6a101b
Remove EndpointBuilder
...
Now that rustls configuration is more straightforward, this is not
adding significant value.
2021-10-29 20:12:45 +02:00
Benjamin Saunders
495d2927cb
Remove certificate newtypes
2021-10-29 08:02:13 +02:00
Dirkjan Ochtman
07aac1238b
Bump crc dependency to current version
2021-09-29 10:14:32 -07:00
Dirkjan Ochtman
fed3c5cb39
Require explicit construction of ServerConfigs
2021-09-29 10:12:44 -07:00
Dirkjan Ochtman
a7efd92044
Require explicit construction of ClientConfigs
2021-09-29 10:12:44 -07:00
Chris Connelly
e63dd77376
Make TransportConfig setters infallible
...
For most setters this was just a case of changing the signature to take
a `VarInt`.
`max_idle_timeout` was a bit more involved in order to maintain a usable
conversion from `Duration`. The internal representation was changed from
`Duration` from `VarInt`, and an `IdleTimeout` newtype was introduced
for the setter signature. `IdleTimeout` contains a `VarInt`-encoded
millisecond value, and has a fallible conversion from `Duration`. The
use of a newtype is preferable to a direct `Duration` -> `VarInt`
encoding since there could be other `VarInt`-encoded values in future
that use a different resolution than milliseconds.
These changes allow callers to avoid the type-level possibility of error
if they have a `VarInt` (or a value that can be converted infallibly
into one). Fallible conversion from `VarInt` is still convenient with
`TryInto`, and callers can handle the conversion errors without the
indirection of `ConfigError`.
Closes #1176 .
BREAKING CHANGE: The `max_concurrent_bidi_streams`,
`max_concurrent_uni_streams`, `stream_receive_window`, and
`receive_window` methods on `TransportConfig` now take `VarInt`
arguments and return `&mut Self`. `TransportConfig::max_idle_timeout`
now takes an `IdleTimeout` argument and returns `&mut Self`.
2021-09-19 18:30:43 -07:00
Marcel Märtens
b224d1d0fa
switch to futures_utils in tests and benches, also use futures_utils isntead of futures_core
2021-08-11 10:27:32 +02:00
Dirkjan Ochtman
d78b3187a9
Apply clippy suggestions from Rust 1.54
2021-07-30 13:29:32 -07:00
Dirkjan Ochtman
51685fb760
Upgrade to tokio 1, bytes 1 and rustls 0.19
2021-01-25 08:53:00 +01:00
Benjamin Saunders
fe10e89409
Return a read error on ordered-after-unordered reads
2020-05-29 16:04:52 +02:00
Dirkjan Ochtman
f6904d6140
Apply suggestions from clippy
2020-04-25 09:43:13 -07:00
Benjamin Saunders
a4fea5a7fd
Rename idle_timeout to max_idle_timeout to reflect semantics
2020-03-08 12:04:26 -07:00
Dirkjan Ochtman
6cca808d14
Make rustls an optional dependency for quinn
2020-03-07 12:12:01 -08:00
Benjamin Saunders
5774071b48
Spawn driver tasks implicitly
2020-01-13 09:54:26 +01:00
Benjamin Saunders
f34ce8b199
Richer time types in config structs
2020-01-13 08:53:05 +01:00
Benjamin Saunders
09729ebd23
Opaque config structs
...
Only exposing setters improves forwards compatibility and error
checking.
2020-01-13 08:53:05 +01:00
Benjamin Saunders
a29e37f363
Use tuple variants consistently in error enums
...
These are substantially more concise/less noisy to work with.
2019-12-08 19:53:25 -08:00
daxpedda
7233455078
Update tokio, futures and bytes. ( #528 )
2019-12-02 10:42:05 +01:00
Benjamin Saunders
a957bf4aa2
Replace slog with tracing
2019-10-29 10:36:50 +01:00
Benjamin Saunders
2dcb084347
Decouple incoming streams of differing directionalities
2019-09-29 07:38:30 +02:00
Benjamin Saunders
8e1c6b605e
Remove ToSocketAddrs from EndpointBuilder::bind
...
Improves consistency with Endpoint::connect and removes the
possibility of silent blocking should the user pass in a domain
name. The generic API was originally motivated by the convenience of
passing in numeric addresses as strings, but `.parse().unwrap()` is
pretty easy too.
2019-09-29 07:21:06 +02:00
Benjamin Saunders
d07dc907ad
Update for async/await
2019-09-28 10:23:26 +02:00
Benjamin Saunders
f50dd9f54a
Restore NewConnection struct for parts of a connection
...
This enables forwards-compatibility with future extensions such as
a datagram stream.
2019-08-25 14:50:01 -07:00
Benjamin Saunders
5fbe96f46a
Public VarInt type
...
Ensures correctness of application error codes without panics or
adding new internal failure paths.
2019-07-11 20:52:19 +02:00
Benjamin Saunders
b502306ab3
Refactor ReadToEnd helper to work after reads
2019-07-05 08:35:26 +02:00
Dirkjan Ochtman
45ee97bd5a
Upgrade to rcgen 0.4
2019-06-18 14:11:40 -07:00
Dirkjan Ochtman
5e023f8093
Make stream read API more Stream-like
2019-05-20 21:36:45 +02:00
Benjamin Saunders
264904f692
Don't expose 0.5-RTT connections to servers by default
...
0.5-RTT connections have reduced security guarantees and hence must
only be exposed by opt-in.
2019-04-28 21:13:20 +02:00
Benjamin Saunders
9eea392e35
Restrict read_to_end to unread streams
2019-04-25 06:46:09 +02:00
Benjamin Saunders
8966c7e2d1
Don't yield stream from ReadToEnd
...
This was left over from before bidirectional streams were decoupled.
2019-04-25 06:46:09 +02:00
Dirkjan Ochtman
734978e59e
Rename quinn::Endpoint::new() to builder()
2019-04-16 17:55:13 -07:00
Dirkjan Ochtman
2fb15b9a07
Add high-level API for 0-RTT support
2019-04-13 20:58:16 +02:00
Dirkjan Ochtman
16e4b96f4b
Simplify high-level streams API
2019-04-12 19:59:23 +02:00