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
Marten Seemann
35da77afd1
only accept 0-RTT it the active_connection_id_limit didn't change
2021-03-03 21:52:45 +08:00
Marten Seemann
82ac6dcf6d
rename MaxReceivePacketSize to MaxPacketBufferSize
...
We use the same buffer size for sending and receiving packets.
2021-03-03 12:00:14 +08:00
Marten Seemann
eea0b1eacd
rename MaxPacketSizeIPv{4,6} to InitialPacketSizeIPv{4,6}
2021-03-03 12:00:14 +08:00
Marten Seemann
6ece64d8a5
log connection IDs without the 0x prefix
2021-02-11 09:45:40 +08:00
Marten Seemann
cafa7c45d0
Merge pull request #2995 from lucas-clemente/simplify-tp-parsing-switch
...
simplify switch statement in the transport parameter parser
2021-01-15 17:05:59 +08:00
Marten Seemann
2e5c43bef0
remove unneeded overflow check when parsing the max_ack_delay
2021-01-11 15:57:47 +08:00
Marten Seemann
8e94f08ee5
simplify switch statement in the transport parameter parser
2021-01-11 15:29:00 +08:00
Marten Seemann
f9226887b4
rename ReadVarint / WriteVarInt / VarIntLen to Read / Write / Len
2021-01-02 00:15:07 +08:00
Marten Seemann
11c5045065
move varint encoding / decoding to a separate package
...
... which is not internal.
2021-01-01 11:46:45 +08:00
Marten Seemann
c7d3aeea3d
move the transport parameter stream limit check to the parser
2020-12-18 13:00:33 +07:00
Marten Seemann
fd41e8fa62
reject DATAGRAM frames if datagram support is not enabled
2020-12-09 15:31:23 +07:00
Marten Seemann
021f70aac5
implement the max_datagram_frame_size transport parameter
2020-12-09 15:31:23 +07:00
Marten Seemann
c4de242751
add a MaxDataLen function for DATAGRAM frames
2020-12-09 15:31:23 +07:00
Marten Seemann
eefd2b73f7
implement parsing and writing of the DATAGRAM frames
2020-12-08 20:16:32 +07:00