Commit graph

174 commits

Author SHA1 Message Date
Marten Seemann
ebbf839fa4 move the packet number generator to the ackhandler package 2018-11-02 17:14:31 +07:00
Marten Seemann
16848038be remove unnecessary initial packet number parameter 2018-11-02 17:14:31 +07:00
Marten Seemann
716e8f2d0a remove the error return value from wire.Header.GetLength
Using an invalid packet number length would error on Header.Write(), so
it's not necessary to check this on GetLength().
2018-11-01 13:49:36 +07:00
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07:00
Marten Seemann
e470d71c3a add ACK frames to crypto packets 2018-10-29 13:34:32 +07:00
Marten Seemann
82508f1562 use tls-tris instead of mint 2018-10-26 16:18:49 +07:00
Marten Seemann
5df98dc389 split the packet packer into two structs, for gQUIC and for IETF QUIC 2018-10-09 23:05:23 +01:00
Marten Seemann
25847cfc30 handle the crypto stream separately in the packet packer 2018-10-01 11:25:57 -07:00
Marten Seemann
f68621485f simplify splitting of STREAM frames for retransmissions 2018-09-28 22:56:45 -06:00
Marten Seemann
06db39836b move queueing of control frames to the framer 2018-09-28 21:04:57 -06:00
Marten Seemann
9f5bfbe292 handle the transport parameters in the packet packer 2018-09-28 15:21:29 -06:00
Marten Seemann
7034481d9e get ACK and STOP_WAITING frames in the packet packer 2018-09-28 09:51:05 -06:00
Marten Seemann
c476eaf019 move determining the maximum packet size to a separate function 2018-09-28 09:28:45 -06:00
Marten Seemann
641ab6390f append STREAM frames to the slice of frames when packing a packet 2018-09-28 09:28:45 -06:00
Marten Seemann
01100c56df implement packing of packets for gQUIC 44 2018-08-28 08:49:29 +07:00
Marten Seemann
f88b7bb175 implement the new Retry mechanism 2018-08-13 08:47:29 +07:00
Marten Seemann
4109c85c8a refactor header parsing in a version independent and dependent part 2018-07-01 09:01:30 +07:00
Marten Seemann
7b96d158d2 remove the OmitConnectionID field from the Header struct
Instead, just look at the length of the destination connection ID.
2018-06-24 17:21:41 +07:00
Marten Seemann
fc57bf6c35 only set the destination connection ID for the Public Header 2018-06-24 16:47:59 +07:00
Marten Seemann
3e03055a7d use varint packet numbers in IETF QUIC headers 2018-06-06 16:07:47 +02:00
Marten Seemann
ec6118f7a0 use the connection ID provided by the server in first Handshake packet 2018-05-30 21:37:05 +08:00
Marten Seemann
a7f550ae0f set the payload length on Long Headers when packing packets 2018-04-23 17:41:07 +09:00
Marten Seemann
fae32101a0 use different source and destination connection IDs 2018-04-23 15:23:01 +09:00
Marten Seemann
52d31dd7ef implement the new header format
Currently, we're only sending and accepting packets with matching source
and destination connection IDs.
2018-04-19 13:46:54 +09:00
Marten Seemann
302d2a1715 don't use trial decryption for IETF QUIC 2018-03-31 14:29:44 +07:00
Marten Seemann
6c1eba5848 generate the diversification nonce when creating the server crypto setup 2018-03-31 14:29:44 +07:00
Marten Seemann
1c2e104a86 don't set the send time of a packet in the sent packet handler 2018-03-30 13:28:22 +07:00
Marten Seemann
56720edc34 report retransmissions separately to the sent packet handler 2018-03-14 11:15:52 +01:00
Marten Seemann
9d18d30931 use the peer's max_packet_size when packing packets 2018-03-10 14:27:07 +07:00
Marten Seemann
6ccc76a130 send packets with maximum IPv4 and IPv6 packet size 2018-03-09 22:36:44 +07:00
Marten Seemann
abf57a5551 calculate the packet number length in the sent packet handler 2018-03-07 15:56:18 +07:00
Marten Seemann
8fc573c895 set the packet type for handshake retransmissions 2018-03-04 22:33:10 +07:00
Marten Seemann
656dff6163 introduce a UsesStopWaitingFrames() method for version numbers 2018-03-02 16:00:11 +07:00
Marten Seemann
a1c9e706b0 omit the data length in the last STREAM frame of a retransmission 2018-02-26 22:22:21 +08:00
Marten Seemann
ca7291e8cf send retransmission as separate packets 2018-02-26 22:22:17 +08:00
Marten Seemann
07b8821ef7 use pointer to byte slices in the buffer pool
https://staticcheck.io/docs/staticcheck#SA6002 suggests to use pointers
to objects in the sync.Pool.
2018-02-23 18:57:12 +08:00
Marten Seemann
88da8e2e0a retransmit Initial packets as Initial packets 2018-02-23 15:58:24 +08:00
Marten Seemann
80969de93f fix splitting of STREAM frames for IETF QUIC
Move splitting of STREAM frames from the quic package to the wire
package.
2018-02-05 12:02:58 +08:00
Marten Seemann
38c420a35b include the packet size in the error when packing a too large packet 2018-02-05 09:17:30 +08:00
Marten Seemann
3b82628dbe internalize ackhandler and congestion 2018-02-02 08:40:56 +08:00
Marten Seemann
fbeba1f73a make sure that at least every 20th ACK is retransmittable
This is important because we need to make sure that we can remove old
ACK ranges from the received packet history. The logic we implemented
before was not correct, since we only made sure that every 20th packet
would be retransmittable, but we didn't have any guarantee that this
packet would also contain an ACK frame.
2018-02-01 17:11:05 +08:00
Marten Seemann
d330fda94c also use the onHasStreamData callback for the crypto stream 2018-01-09 17:17:16 +07:00
Marten Seemann
092908d3e0 simplify sending of (connection-level) BLOCKED frames 2017-12-20 10:23:17 +07:00
Marten Seemann
2c83c9e3f0 don't send STOP_WAITING frames (for IETF QUIC) 2017-12-14 23:14:05 +07:00
Marten Seemann
8e0060c51b ignore STOP_WAITINGs, derive lower bound for packets to include in ACK 2017-12-14 19:23:06 +07:00
Marten Seemann
c1559be957 fix race condition when queueing RST_STREAM frames 2017-12-13 17:35:34 +07:00
Marten Seemann
8e1f62f749 when forcing a retransmittable packet, bundle the PING with other frames
We're sending a retransmittable packet every 20 packets (if there are no
other frames to send). To make a packet retransmittable, we add a PING
frame. We should bundle this PING with an ACK.
2017-12-12 23:10:43 +07:00
Marten Seemann
73ab97aa95 simplify the stream by directly popping STREAM frames from it 2017-12-12 18:48:08 +07:00
Marten Seemann
4b4e487486 remove the error return value from wire.Frame.MinLength
No functional change expected.
The error was only non-nil if some required values for the STOP_WAITING
frame were not set. It should be sufficient to throw an error when
attempting to write an invalid STOP_WAITING frame.
2017-12-12 17:33:04 +07:00
Marten Seemann
6019634286 pad Initial packets to the required minimum size (1200 bytes) 2017-12-08 11:50:43 +07:00