Commit graph

289 commits

Author SHA1 Message Date
Marten Seemann
fb65a017ac use shorter packet numbers on Long Header packets 2020-02-26 11:26:15 +07:00
Marten Seemann
2ea6a294a9 send the CONNECTION_CLOSE in all available encryption levels 2020-02-25 17:10:44 +07:00
Marten Seemann
ebe3c1cca4 pad the client's Initial packets outside of the QUIC packet
This allows us to send coalesced packets of Initial and 0-RTT.
2020-02-24 13:57:54 +07:00
Marten Seemann
7a532326ec don't pack ACK frames in the second part of a coalesced packet
This prevents a possible overflow of the maximum packet size if the ACK
frames ends up being really large.
2020-02-20 16:42:58 +07:00
Marten Seemann
29b784e782 rename packet packing functions in the packet packer 2020-02-20 16:42:58 +07:00
Marten Seemann
5aad7cae5d send coalesced packets 2020-02-20 16:42:56 +07:00
Marten Seemann
d642bf9098 simplify content storage in packed packets
It's not necessary to store both the packetBuffer and the slice
containing the raw data in the packet.
2020-02-20 16:25:54 +07:00
Marten Seemann
a4b4d52063 refactor packing of packets before and after the handshake is confirmed 2020-02-20 16:19:08 +07:00
Marten Seemann
b031615db5 export a qlog when the session's run loop stops 2020-02-12 10:42:37 +07:00
Marten Seemann
c79dfe77b8 implement packing of 0-RTT packets 2020-01-01 18:04:02 +04:00
Marten Seemann
fbbe225719 implement a function to pack probe packets 2019-11-12 11:27:30 +07:00
Marten Seemann
5f14b03135 refactor packet packer 2019-11-12 11:27:30 +07:00
Marten Seemann
772ffd3d20 use the connection ID manager to save the destination connection ID 2019-11-05 10:59:21 +07:00
Marten Seemann
5ea33cd31e implement a buffer pool for STREAM frames 2019-09-04 16:55:30 +07:00
Marten Seemann
f49451ce3c queue lost STREAM frames in the stream's retransmission queue 2019-08-31 17:36:16 +07:00
Marten Seemann
e622207822 assemble ackhandler.Frames, not wire.Frames, when packing a packet 2019-08-31 17:34:54 +07:00
Marten Seemann
1d392b4276 retransmit frames instead of packets 2019-08-29 15:00:10 +07:00
Marten Seemann
0c85e0eab9 remove unused PacketType field from the ackhandler.Packet 2019-08-21 14:49:00 +07:00
Marten Seemann
9221149194 simplify how the largest acked is passed to the ackhandler 2019-08-21 14:40:38 +07:00
Marten Seemann
0ce749b5f1 pack ACK-only packets for all encryption levels 2019-07-01 07:19:47 +07:00
Marten Seemann
c3142f9dc3 only try packing crypto packets before the handshake is confirmed 2019-06-25 14:31:34 +08:00
Marten Seemann
b2d3ef691e use separate sealer interfaces for long and short header packets 2019-06-22 20:01:18 +08:00
Marten Seemann
c503769bcd use separate functions per encryption level to get sealers 2019-06-22 20:01:18 +08:00
Marten Seemann
dba964f735 fix packing of maximum-size packets 2019-04-27 00:35:55 +09:00
Marten Seemann
f112edd894 handle ACK frames separately when packing packets 2019-04-22 12:45:53 +09:00
Marten Seemann
3d22d56ed8 refactor how padding is added in the packet packer 2019-04-22 12:44:51 +09:00
Marten Seemann
109bb3fe62 pass the length of the packet being packet around in the packet packer 2019-04-22 10:26:11 +09:00
Marten Seemann
b5336be518 rename retransmittable to ack-eliciting 2019-04-12 13:25:39 +09:00
Marten Seemann
28ed85b9c6 move cutting of coalesced packets to the wire package 2019-02-23 10:24:42 +08:00
Marten Seemann
f6642ff948 use separate packet number spaces for sending packets
Packet numbers now start at 0 for every packet number spaces.
Furthermore, an ACK frame now only acknowledges packets in the packet
number space it was sent in.
2019-02-11 20:13:05 +08:00
Marten Seemann
7a7e7ca6eb add a function to pass the retry token to the packet packer 2019-02-02 09:24:37 +08:00
Marten Seemann
cebb4342ec use the ack_delay_exponent sent in the transport parameters 2019-01-28 16:09:47 +09:00
Marten Seemann
741521c4d1 refactor frame parsing into a separate struct 2019-01-28 16:09:47 +09:00
Marten Seemann
a303ad9745 always send ACKs in the correct packet number space 2019-01-11 11:12:07 +07:00
Marten Seemann
be4bdbfad9 remove the encryption level from the packed packet struct
This was only needed in gQUIC. In IETF QUIC, We can always derive the
encryption level from the header type when needed.
2018-12-30 12:37:04 +07:00
Marten Seemann
a638185f97 apply header encryption when packing and unpacking packets 2018-12-14 21:34:00 +06:30
Marten Seemann
cf957bb3d0 pad small packets, such that len(packet number) + len(payload) >= 4 2018-11-29 11:22:20 +07:00
Marten Seemann
05434fecbc always use 4 byte packet numbers for long header packets
When retransmitting a long header packet, we never have to split CRYPTO
frames, since the header is guaranteed to have the same size.
2018-11-29 09:39:43 +07:00
Marten Seemann
723e18c78c don't treat handshake retransmissions separately 2018-11-29 09:39:43 +07:00
Marten Seemann
1b3e4e9595
Merge pull request #1647 from lucas-clemente/remove-packet-packer-cansenddata
remove unneeded check if stream data can be sent in packet packer
2018-11-28 18:10:04 +07:00
Marten Seemann
610f923f91 remove special treatment of handshake retransmissions 2018-11-28 10:57:39 +07:00
Marten Seemann
a13e45000f remove unneeded check if stream data can be sent in packet packer
We don't return the session before the handshake completes, so there
shouldn't be any stream data to send.
2018-11-28 10:34:22 +07:00
Marten Seemann
70ce6a5814 parse the whole Long Header, if the version is known 2018-11-26 15:57:54 +07:00
Marten Seemann
af157408de move parsing of extended headers to the same file as the struct 2018-11-26 15:57:54 +07:00
Marten Seemann
7b91ba56b6 rename the wire.InvariantHeader to Header 2018-11-26 15:57:54 +07:00
Marten Seemann
cef26922b4 when parsing the header from the invariant header, start from first byte
This will be needed once we implement header encryption, because the
flags in the first byte are encrypted.
2018-11-26 15:57:54 +07:00
Marten Seemann
902853784b remove unused perspective from header parsing 2018-11-26 11:14:39 +07:00
Marten Seemann
fd646ff877 include the packet number len in the length calculation for long headers 2018-11-25 14:16:28 +07:00
Marten Seemann
022189dfda rename the RST_STREAM frame to RESET_STREAM frame 2018-11-04 12:26:02 +07:00
Marten Seemann
c81cd92daf return the packet number length when peek a new packet number 2018-11-02 17:14:31 +07:00