Commit Graph

5151 Commits

Author SHA1 Message Date
Marten Seemann
160c11bd34 cancel reading on unidirectional streams when the stream type is unknown
Otherwise the stream would remain open indefinitely.
2020-12-23 15:00:01 +07:00
Marten Seemann
f68dfd5c3b Merge pull request #2949 from lucas-clemente/http3-control-streams
implement HTTP/3 control stream handling
2020-12-23 14:58:51 +07:00
Marten Seemann
808671e2d4 accept the control stream and parse SETTINGS frame, for the H3 client 2020-12-23 14:49:41 +07:00
Marten Seemann
f92b0ec74a make the HTTP/3 client request tests more strict 2020-12-23 14:47:16 +07:00
Marten Seemann
04eebb7f6a reject push streams initiated by the client 2020-12-23 14:47:16 +07:00
Marten Seemann
bf54ffe0df accept the control stream and parse SETTINGS frame, for the H3 server 2020-12-23 14:47:14 +07:00
Marten Seemann
bcbdd438cb Merge pull request #2950 from lucas-clemente/fix-flaky-sent-packet-handler-test
fix flaky sentPacketHandler test
2020-12-22 16:49:22 +07:00
Marten Seemann
9f6d1f5578 Merge pull request #2942 from lucas-clemente/dont-retransmit-ack-only-pings
don't retransmit PING frames added to ACK-only packets
2020-12-22 16:49:02 +07:00
Marten Seemann
53c8e33323 Merge pull request #2944 from lucas-clemente/tp-max-streams-error
move the transport parameter stream limit check to the parser
2020-12-22 16:48:45 +07:00
Marten Seemann
fdc2b91e03 Merge pull request #2946 from lucas-clemente/remove-initial-version
remove unused initialVersion variable in session
2020-12-22 16:48:30 +07:00
Marten Seemann
79d14dbe9b Merge pull request #2945 from lucas-clemente/remove-unneeded-peer-params-check
remove unneeded check for the peer's transport parameters
2020-12-22 16:48:09 +07:00
Marten Seemann
f68691b316 Merge pull request #2947 from lucas-clemente/h3-message-error
add the H3_MESSAGE_ERROR
2020-12-22 16:47:47 +07:00
Marten Seemann
deaa1d761e Merge pull request #2948 from lucas-clemente/http3-simplify-tests
simplify Read and Write mock calls in http3 tests
2020-12-22 16:47:27 +07:00
Marten Seemann
31de6244e2 fix flaky sentPacketHandler test 2020-12-21 18:07:31 +07:00
Marten Seemann
4c6496bc0e simplify Read and Write mock calls in http3 tests 2020-12-21 14:41:22 +07:00
Marten Seemann
8a84201ce4 add the H3_MESSAGE_ERROR 2020-12-21 12:04:29 +07:00
Marten Seemann
c7d3aeea3d move the transport parameter stream limit check to the parser 2020-12-18 13:00:33 +07:00
Marten Seemann
6217ec55fd remove stray comment in the streams map 2020-12-18 12:34:04 +07:00
Marten Seemann
19ddefd1d9 remove unneeded check for the peer's transport parameters
We create a new flow controller when opening a new streams. This can only
happen after the session is returned, in which case we should have already
received the transport parameters.
2020-12-18 12:16:07 +07:00
Marten Seemann
ad7d90779a remove unused initialVersion variable in session 2020-12-18 12:00:17 +07:00
Marten Seemann
d8858d767d don't retransmit PING frames added to ACK-only packets
Every 20 non-ack-eliciting packets, we add a PING frame to make that
packet ack-eliciting. That way, we regularly receive acknowledgements,
even if we're not actually sending any data. This allows us to clean up
our sent packet history.
There's no need to retransmit this PING frame though. We'll just send a
new one if one of them is lost, as soon as we've sent another 20
non-ack-eliciting packets.
2020-12-17 11:36:02 +07:00
Marten Seemann
9693a46d31 Merge pull request #2162 from lucas-clemente/datagram
implement the datagram draft
2020-12-17 11:22:40 +07:00
Marten Seemann
c20a9247e1 Merge pull request #2937 from lucas-clemente/fix-bytes-in-flight-tracing-after-ack
fix logging of bytes_in_flight when receiving an ACK
2020-12-16 10:21:57 +07:00
Marten Seemann
25ffbbe4d8 Merge pull request #2939 from lucas-clemente/trace-dropped-packets-due-to-chan-overflow
trace when a packet is dropped because the receivedPackets chan is full
2020-12-16 10:21:28 +07:00
Marten Seemann
7c2e938684 trace when a packet is dropped because the receivedPackets chan is full 2020-12-15 15:20:13 +07:00
Marten Seemann
d3abf0ec3f fix logging of bytes_in_flight when receiving an ACK
The tracing call needs to be issued after subtracting acknowledged and
lost packets from the bytes_in_flight.
2020-12-15 12:04:12 +07:00
Marten Seemann
486738981f Merge pull request #2905 from lucas-clemente/improve-packet-number-generator
various improvements to the packet number generator
2020-12-15 10:15:31 +07:00
Marten Seemann
4c0f0c47eb Merge pull request #2930 from lucas-clemente/handshake-idle-timeout
introduce a quic.Config.HandshakeIdleTimeout, remove HandshakeTimeout
2020-12-15 08:35:44 +07:00
Marten Seemann
be476d90e0 Merge pull request #2936 from lucas-clemente/initial-conn-ids
allow up to 20 byte for the initial connection IDs
2020-12-14 23:39:51 +07:00
Marten Seemann
a769e8221b Merge pull request #2932 from lucas-clemente/undecryptable-packets-allocation
reduce memory footprint of undecryptable packet handling
2020-12-14 23:36:03 +07:00
Marten Seemann
4f84c1b85a Merge pull request #2934 from lucas-clemente/use-buffer-for-retries
use a buffer from the pool for composing Retry packets
2020-12-14 23:35:29 +07:00
Marten Seemann
f410eadb2c Merge pull request #2935 from lucas-clemente/release-buffer-on-connection-close
release the packet buffer after sending a CONNECTION_CLOSE in the server
2020-12-14 23:31:46 +07:00
Marten Seemann
019850efd6 use a buffer from the pool for composing Retry packets 2020-12-14 11:55:42 +07:00
Marten Seemann
fb995161e7 release the packet buffer after sending a CONNECTION_CLOSE in the server 2020-12-14 11:51:09 +07:00
Marten Seemann
d226f70cd7 allow up to 20 byte for the initial connection IDs 2020-12-14 11:32:43 +07:00
Marten Seemann
c8626d89e5 assert that no undecryptable packets are queueud after the handshake 2020-12-11 12:17:04 +07:00
Marten Seemann
02139a4743 delete the slice of undecrytable packets when the handshake completes 2020-12-11 12:13:21 +07:00
Marten Seemann
736af5698a don't preallocate a slice for undecryptable packets
Under normal conditions, we don't expect to receive any undecryptable
packets. We expect to receive a few when there's packet loss and / or
reordering during the handshake, but even in that case the number will
most likely be smaller than protocol.MaxUndecryptablePackets.
2020-12-11 12:12:17 +07:00
Marten Seemann
1728a6c90c add an integration test for datagram transfers 2020-12-09 15:47:24 +07:00
Marten Seemann
98145368cd implement receiving of DATAGRAM frames 2020-12-09 15:31:23 +07:00
Marten Seemann
791f896f80 implement sending of datagrams 2020-12-09 15:31:23 +07:00
Marten Seemann
fdaac4f32e send the max_datagram_frame_size transport parameter 2020-12-09 15:31:23 +07:00
Marten Seemann
fd41e8fa62 reject DATAGRAM frames if datagram support is not enabled 2020-12-09 15:31:23 +07:00
Marten Seemann
913ddc5081 add a quic.Config option for DATAGRAM frames 2020-12-09 15:31:23 +07:00
Marten Seemann
231bc918d4 implement packing of DATAGRAM frames 2020-12-09 15:31:23 +07:00
Marten Seemann
c47ccab930 implement a datagram queue 2020-12-09 15:31:23 +07:00
Marten Seemann
e951646fb6 tell if a peer supports DATAGRAM frames in the ConnectionState 2020-12-09 15:31:23 +07:00
Marten Seemann
356c69944e return a quic.ConnectionState from Session.ConnectionState() 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
d6eff22f9a introduce a sentinel ByteCount value 2020-12-09 15:31:23 +07:00