Commit Graph

210 Commits

Author SHA1 Message Date
Lucas Clemente
d1e3b541d3 replace streamFrameQueue with just-in-time framing of written data
This commits replaces the stream frame queue with a framer which
requests data from the streams just when a frame is needed by the
packet packer. This simplifies a lot of things and allows some other
refactorings, see issue #83.

There are a few pending tests which will be fixed soon.
2016-07-08 18:21:44 +02:00
Marten Seemann
ef9baf67fc use FlowControlManager in StreamFrameQueue 2016-07-06 10:17:42 +02:00
Marten Seemann
1d358a031f ignore packets smaller than LeastUnacked of a StopWaiting
ref #196
2016-07-03 23:32:08 +08:00
Marten Seemann
8071fda5ee ignore duplicate packets
fixes #197
2016-07-03 23:22:12 +08:00
Marten Seemann
3e604a274d add tests for receiving packets in Session
ref #197
2016-07-03 23:19:07 +08:00
Marten Seemann
1786c952c5 fix duplicate and out-of-order ACK detection in SentPacketHandler
fixes #192
2016-06-26 16:15:34 +07:00
Marten Seemann
eb03ed5334 rename AckHandler package to AckHandlerLegacy 2016-06-21 19:51:26 +07:00
Marten Seemann
288cb9e143 rename AckFrame to AckFrameLegacy 2016-06-21 19:51:26 +07:00
Marten Seemann
5651a7cfc1 pass QUIC version number to Frame.MinLength
ref #181
2016-06-19 13:43:58 +07:00
Marten Seemann
5d02033f0f use FlowControlManager in Stream for Reading data 2016-06-15 19:39:50 +07:00
Marten Seemann
9aea21f8d6 handle ReceivedPacketHandler errors in Session when handling a packet
ref #132
2016-06-11 11:54:42 +07:00
Marten Seemann
1c1101de0e remove queued StreamFrames when a Stream is closed with an error
fixes #149
2016-06-10 19:18:51 +07:00
Marten Seemann
b1c27b5eca initialize StreamFrameQueue in Session, not in PacketPacker 2016-06-10 19:06:40 +07:00
Marten Seemann
1491bc20f4 fix flaky tests on AppVeyor 2016-06-09 12:24:25 +07:00
Marten Seemann
68e3c8e552 queue RTO retransmissions before checking for congestion window size 2016-06-08 12:08:38 +07:00
Lucas Clemente
0d6dbfe746 log stream GC 2016-06-06 23:37:10 +02:00
Lucas Clemente
6475a5bb3e fix a race condition in session.handleWindowUpdateFrame 2016-06-06 23:36:48 +02:00
Lucas Clemente
6cc5440240 ensure session is closed when TooManyStreams occurs 2016-06-06 22:05:51 +02:00
Lucas Clemente
6d58618279 properly ignore errors in session
ref #170
2016-06-06 15:05:38 +02:00
Marten Seemann
c0d21ad070 log correct size of received packets
fixes #171
2016-06-06 19:32:37 +07:00
Marten Seemann
3f86e0f198 dequeue all retransmission when sending a packet 2016-06-06 12:04:02 +07:00
Lucas Clemente
981b465287 fix a race condition of openStreamsCount in session 2016-06-05 12:17:10 +02:00
Lucas Clemente
6a46465092 reduce calls to Debugf when not debugging to reduce slice allocs
ref #129
2016-06-04 15:13:46 +02:00
Lucas Clemente
68478ed3f1 fix a race condition with stream creation
fixes #164, ref #163
2016-06-03 21:01:02 +02:00
Marten Seemann
2f49a9525a add DataLen function to StreamFrame 2016-06-01 09:23:26 +07:00
Lucas Clemente
8fa3e62de9 implement parsing and writing of GOAWAY frames 2016-05-31 19:22:27 +02:00
Lucas Clemente
c546f5c9dc enforce max streams per connection limit
fixes #13
2016-05-27 22:39:37 +02:00
Marten Seemann
ffbd68770e remove closed streams from WindowUpdateManager
fixes #99
2016-05-27 19:08:05 +07:00
Marten Seemann
d906492ae7 don't retransmit a packet after receiving a belated ACK
fixes #139
2016-05-27 18:36:28 +07:00
Lucas Clemente
d4a189b2d1 refactor timer calculation in sesssion to reduce syscalls 2016-05-24 17:42:47 +02:00
Lucas Clemente
55fe1390b3 remove some allocations
ref #129
2016-05-24 15:36:35 +02:00
Lucas Clemente
6c2932a872 small session fixes 2016-05-24 13:22:10 +02:00
Lucas Clemente
fa2e34d360 require and generate source address tokens in crypto setup
fixes #121
2016-05-24 11:20:16 +02:00
Marten Seemann
e2254f1bbd limit number of packets stored in SentPacketHandler
fixes #140
2016-05-24 16:06:48 +07:00
Marten Seemann
931687e9a4 better function name in SentPacketHandler 2016-05-24 15:39:48 +07:00
Marten Seemann
68f450d549 log ConnectionClose packets in debug log 2016-05-22 12:01:32 +07:00
Marten Seemann
bf4aa2dce9 remove closed streams from BlockedManager
fixes #120
2016-05-21 19:19:41 +07:00
Lucas Clemente
2feb376e67 fix a race condition where the session timer could have fired early 2016-05-20 16:49:39 +02:00
Marten Seemann
57066faef9 add seperate PacketPacker method to pack a ConnectionClose packet
fixes #134
2016-05-20 20:49:29 +07:00
Marten Seemann
d571c0bfd5 remove stream from BlockManager when a WindowUpdate increases its offset
fixes #130
2016-05-20 12:26:10 +07:00
Marten Seemann
c748a8dfc0 create FlowController interface 2016-05-19 19:49:33 +07:00
Lucas Clemente
f96282b4d4 don't set RTO and small packet timeout when we can't actually send
fixes #126
2016-05-19 14:24:35 +02:00
Lucas Clemente
bd6d893cc4 replace time.After in session with a single timer
fixes #128, fixes #127
2016-05-19 14:24:35 +02:00
Marten Seemann
9930de68c8 send stream-level Blocked frames at the right time
fixes #110
2016-05-19 11:53:51 +07:00
Lucas Clemente
838291cd14 don't set the small packets timer when no packet is ready for sending 2016-05-18 23:22:23 +02:00
Lucas Clemente
4822def788 implement timeout-based retransmission (RTO)
fixes #56
2016-05-18 23:21:33 +02:00
Lucas Clemente
753f219638 implement RTO computation in sentPacketHandler
ref #56
2016-05-18 20:50:22 +02:00
Lucas Clemente
a0228a9049 move congestion control from session to ackhandler
this simplifies things a bit, especially in prep for #56
2016-05-18 19:35:31 +02:00
Lucas Clemente
7a97f34fac don't panic 🤓
fixes #93
2016-05-18 18:29:42 +02:00
Marten Seemann
f147ebc9bb implement basic connection level flow control
fixes #39
2016-05-18 17:30:08 +07:00