Commit Graph

309 Commits

Author SHA1 Message Date
Marten Seemann
a595d34557 use a single ACK frame in the receive path 2023-06-02 17:21:46 +03:00
Marten Seemann
fce0261c34 wire: apply the default value for the active_connection_id_limit (#3806) 2023-05-28 11:45:46 -07:00
Marten Seemann
378e3c8b74 wire: save ECN counts on the ACK frame (#3829) 2023-05-28 16:36:38 +03:00
Sukun
cb3453db25 fix comment claiming ParseConnectionID reuses the data slice (#3848) 2023-05-21 07:54:50 -07:00
Marten Seemann
a519d827d1 wire: use a dedicated rand.Rand for greasing transport parameters (#3758)
rand.Seed is deprecated since Go 1.20. This change also reduces
(potential) lock contention when obtaining random numbers / bytes.
2023-04-19 06:21:25 -07:00
Marten Seemann
f36690ae9c protocol: remove VersionWhatever, previously used for testing (#3763) 2023-04-19 06:19:27 -07:00
Marten Seemann
969b5dc131 add a handshake test for post-quantum-size ClientHellos (#3759)
Post-quantum ClientHellos typically are larger than 1 MTU and will
therefore need to be split across multiple packets.
2023-04-19 06:01:43 -07:00
Marten Seemann
7a393315bd wire: use constants for frame types (#3739) 2023-04-19 05:58:31 -07:00
Marten Seemann
eb05964942 wire: speed up identification of 0-RTT packets (#3761) 2023-04-19 05:50:57 -07:00
Marten Seemann
da26f91905 wire: correctly parse multi-byte frame types (#3736) 2023-04-19 05:42:23 -07:00
Marten Seemann
04c3fd0756 deprecate quicvarint.Write in favor of quicvarint.Append (#3690) 2023-02-13 02:52:25 -08:00
Marten Seemann
3d9380ec3c reject invalid active_connection_id_limit transport parameter values (#3687) 2023-02-01 17:03:19 -08:00
Marten Seemann
58cedf7a4f rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
ef28f4667f refactor frame parser to remove version parameter from constructor 2023-01-18 20:51:58 +13:00
Marten Seemann
c24fbb094c refactor header writing to append to a byte slice (#3646)
This avoids having to allocate a bytes.Buffer.
2023-01-17 01:56:06 -08:00
Marten Seemann
86edf7fd4b remove the LongHeader field from the wire.Header 2023-01-17 21:53:39 +13:00
Marten Seemann
aca052dc7c stop using the ExtendedHeader for parsing short header packets in tests 2023-01-17 21:53:39 +13:00
Marten Seemann
e89fc1152b stop using the ExtendedHeader for writing short header packets in tests 2023-01-17 21:53:39 +13:00
Marten Seemann
124e597cf9 add a function to write short headers 2023-01-17 21:53:39 +13:00
Marten Seemann
4bf50901e8 add a function to determine the length of a short header 2023-01-17 21:53:39 +13:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
63764c429c use a sync.Pool for ACK frames 2022-09-06 14:41:13 +03:00
Marten Seemann
dfd35cb071 use a single bytes.Reader for frame parsing (#3536) 2022-09-01 01:06:50 -07:00
Marten Seemann
656f3d2d7d remove the wire.ShortHeader in favor of more return values (#3535) 2022-08-30 04:37:36 -07:00
Marten Seemann
0b26365dae Merge pull request #3534 from lucas-clemente/header-parsing
introduce a separate code paths for Short Header packet handling
2022-08-30 14:09:38 +03:00
Marten Seemann
31995601a9 return an error when parsing a too long connection ID from a header (#3533) 2022-08-30 04:08:41 -07:00
Marten Seemann
7023b52e13 speed up marshaling of transport parameters (#3531)
The speedup comes from multiple sources:
1. We now preallocate a byte slice, instead of appending multiple times.
2. Marshaling into a byte slice is faster than using a bytes.Buffer.
3. quicvarint.Write allocates, while quicvarint.Append doesn't.
2022-08-29 23:05:52 +03:00
Marten Seemann
3a12a898a5 add a wire.ShortHeader, implement short header parsing
The new parsing function is vastly faster than the combination of header
and extended header parsing:

BenchmarkShortHeaderParsing-10          44192314                26.79 ns/op           48 B/op          1 allocs/op
BenchmarkShortHeaderParsingOld-10       12627363                99.99 ns/op          228 B/op          3 allocs/op
2022-08-29 15:06:34 +03:00
Marten Seemann
f41772c43c return an error when parsing a too long connection ID from a header 2022-08-29 13:05:24 +03:00
Marten Seemann
1aced95d41 use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
Marten Seemann
9e0f9e62ff parse arbitrary length Connection IDs in Version Negotiation packets 2022-08-29 10:58:33 +03:00
Marten Seemann
21b9ef03be add a type for arbitrary length Connection IDs, and parsing function
RFC 8999 allows Connection IDs of up to 255 bytes. Current QUIC versions
only use up to 20 bytes.
2022-08-29 10:58:33 +03:00
Marten Seemann
d7097d74f0 implement a function to parse the version number of a Long Header packet 2022-08-29 10:58:33 +03:00
Marten Seemann
ab6d664b43 rename frame.Write to frame.Append 2022-08-28 23:18:24 +03:00
Marten Seemann
3ca1001951 append to a byte slice instead of a bytes.Buffer when serializing frames 2022-08-28 23:18:06 +03:00
Marten Seemann
bea5de0221 Merge pull request #3483 from lucas-clemente/generic-min-max
use generic Min and Max functions
2022-08-12 12:09:30 +04:00
Marten Seemann
80fd1b57c8 add a function to distinguish between long and short header packets (#3498) 2022-08-11 07:35:01 -07:00
Marten Seemann
43bde14cf7 implement generic Min and Max functions 2022-08-10 14:59:05 +02:00
Marten Seemann
f3744f6535 implement parsing and writing of QUIC v2 packet headers 2022-05-26 12:57:45 +02:00
Marten Seemann
909a3a9093 remove unneeded version constant in wire tests 2022-05-25 16:12:11 +02:00
Chao Fei
60bbe92194 remove error return value from ComposeVersionNegotiation (#3410) 2022-05-12 08:03:39 -07:00
Marten Seemann
d5961e9d60 update docs to reflect that we support RFC 9221 (Unreliable Datagrams) (#3382) 2022-04-25 04:10:51 -07:00
Marten Seemann
90727cb41a introduce a quic.StreamError type and use it for stream cancelations 2021-05-01 09:39:52 +07:00
Marten Seemann
f5238bf7b1 move the ApplicationErrorCdoe to the qerr package 2021-05-01 09:38:49 +07:00
Marten Seemann
592fb9cad9 introduce a dedicated qerr.TransportError and qerr.ApplicationError 2021-05-01 09:38:48 +07:00
Marten Seemann
31ac5ca60d allow 0-RTT when the server's connection receive limit is increased 2021-03-17 18:53:54 +08:00
Marten Seemann
6c3876d6b3 allow 0-RTT when the server's stream receive limit is increased 2021-03-17 18:46:11 +08:00
Marten Seemann
3588cddd43 allow 0-RTT resumption if the server's stream limit was increased 2021-03-11 21:37:40 +08:00
Marten Seemann
7676e455c5 add a function to tell if a packet is a 0-RTT packet 2021-03-11 21:05:41 +08:00
Marten Seemann
c802ebe026 Merge pull request #3060 from lucas-clemente/check-active-conn-id-limit-for-0rtt
only accept 0-RTT it the active_connection_id_limit didn't change
2021-03-09 15:58:53 +08:00