Marten Seemann
77d4573d9b
return an error when Write is called on a closed stream
2017-07-29 00:19:39 +07:00
Marten Seemann
315aa14ab5
use the new gbytes.TimeoutReader and TimeoutWriter in the stream tests
...
This makes sure that our tests fail, even if stream.Read or stream.Write
block.
2017-07-26 16:15:48 +07:00
Marten Seemann
6546e13e26
implement net.Error interface for stream deadline expiration errors
2017-07-24 21:45:07 +07:00
Marten Seemann
56155986e9
read the CI timescale factor from an environment variable
2017-07-15 23:51:24 +07:00
Marten Seemann
cfc7d1604d
scale all deadline duration in stream tests on the CIs by 20
...
This allows us to run the tests faster locally. On the CIs, where the
timing is less accurate, the tests take longer, but won't be flaky.
2017-07-15 23:46:15 +07:00
Marten Seemann
1acdc5f18e
implement write deadlines
2017-07-15 23:46:15 +07:00
Marten Seemann
5720e8af7d
implement read deadlines
2017-07-15 23:46:15 +07:00
Marten Seemann
5fbd52158f
replace the sync.Cond for stream.Read() by a channel
2017-07-15 23:46:15 +07:00
Marten Seemann
c63be8c544
return the length of data written when the stream errors
2017-06-14 12:08:26 +02:00
Marten Seemann
c0b09c8646
make utils an internal package
2017-06-09 22:28:40 +02:00
Lucas Clemente
8b6a662223
Move flow control mocks to a separate package
...
This allows the other mocks to be used in the FC tests.
2017-06-09 12:08:26 +02:00
Lucas Clemente
eeb2d8d821
Mock FlowControlManager using gomock
2017-06-08 16:06:31 +02:00
Lucas Clemente
1311629830
Remove unnecessary error return value in newStream
2017-06-08 11:09:11 +02:00
Marten Seemann
2a1b3da971
fix flaky stream tests
...
fixes #549
2017-04-18 10:15:54 +07:00
Marten Seemann
e674016312
accept overlapping stream data
2017-02-28 18:34:15 +07:00
Marten Seemann
71227437ee
only retransmit WindowUpdates if no higher WindowUpdate has been sent
...
fixes #394
2017-01-14 15:16:12 +07:00
Marten Seemann
980d0e398f
don’t add bytes read after receiving a RST_STREAM to flow controller
2017-01-09 10:15:12 +07:00
Marten Seemann
d246a295d2
add more stream tests for reading after receiving a RST_STREAM
2017-01-09 09:51:21 +07:00
Marten Seemann
d6a0a145a4
correclty detected the closed state of a stream
...
fixes #380
2017-01-09 09:49:45 +07:00
Marten Seemann
7a91794292
send RST_STREAM frames
...
ref #380
2017-01-09 09:49:44 +07:00
Marten Seemann
a86f31d789
implement a stream.Reset() method
...
ref #380
2017-01-09 09:49:44 +07:00
Marten Seemann
4e0ef58bab
allow stream.Read for streams that a RST was received for
...
and a lot of code improvements
fixes #385
2017-01-09 09:49:43 +07:00
Marten Seemann
8ce763682a
send a RstStreamFrame when receiving a RstStreamFrame on an open stream
...
fixes #378
2017-01-03 17:51:56 +07:00
Marten Seemann
544a58a038
return total bytes sent when resetting a stream in the flow controller
2017-01-03 16:09:18 +07:00
Marten Seemann
9e09198df6
don’t return data for writing from a stream if it was closed with an error
2017-01-03 16:07:18 +07:00
Marten Seemann
bf0caf3c03
pass the byte offset of a RstStreamFrame to the flow controller
...
fixes #377
2017-01-03 12:37:45 +07:00
Marten Seemann
74edf9caad
improve errors returned for flow control violations
2017-01-03 12:01:27 +07:00
Marten Seemann
fb3f753c94
add method to reset a stream at a byte offset to flow controller
...
ref #377
2017-01-03 11:32:42 +07:00
Marten Seemann
c12508c3c9
use a mock ConnectionParametersManager in quic tests
2016-12-08 21:50:10 +07:00
Marten Seemann
5af50c8fd0
correctly read MIDS and MSPC parameter
...
fixes #367
2016-12-08 16:15:31 +07:00
Marten Seemann
32d89eee02
pass RTTStats to the FlowControllers
...
ref #106
2016-10-30 17:36:36 +07:00
Lucas Clemente
2592b9a97c
optimize window update generation, reducing profiler footprint by 8%
2016-09-15 09:12:44 +02:00
Lucas Clemente
53ae201fd2
remove stream.ReadByte
2016-09-05 23:22:49 +02:00
Marten Seemann
f0f500a218
correctly treat nils and empty slices in stream.Write
2016-08-16 19:49:36 +07:00
Marten Seemann
50d6ae205d
change order of parameters in Stream constructor
2016-08-07 13:12:10 +07:00
Marten Seemann
143c3ea16b
remove unused connectionParametersManager from Stream
2016-08-07 13:09:44 +07:00
Lucas Clemente
71a8af827b
improve overlapping stream data errors
...
ref #259
2016-08-06 17:08:23 +02:00
Lucas Clemente
3d0ed0d1f9
trigger sending when stream data is read
...
fixes #223
2016-07-28 16:52:04 +02:00
Lucas Clemente
3a88a8cffa
delete flow controllers for closed streams
...
fixes #177
2016-07-28 16:45:55 +02:00
Lucas Clemente
3aa8b1bf37
remove fcm.StreamContributesToConnectionFlowControl
2016-07-26 17:09:24 +02:00
Lucas Clemente
5f774c8e03
change fcm.SendWindowSize to include conn window to simplify framer
2016-07-26 17:06:54 +02:00
Lucas Clemente
1bc8c882c9
remove session pointer from stream and use a lambda to signal new data
2016-07-11 14:57:54 +02:00
Lucas Clemente
f04d14ac3e
use flow controller for window update handling, remove windowUpdateMgr
2016-07-11 14:54:32 +02:00
Lucas Clemente
bdbf8d3ebe
add BLOCKED frame management to streamFramer
...
ref #211
2016-07-09 14:29:56 +02:00
Lucas Clemente
bb8464efe0
copy the slice passed to stream.Write
2016-07-08 18:21:45 +02:00
Lucas Clemente
3cbf16b66f
add flow control to streamFramer
...
ref #83
2016-07-08 18:21:45 +02:00
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
b38d4b37fe
don't count retransmission as sent bytes for connection flow control
2016-07-06 10:17:43 +02:00
Marten Seemann
8a9d70488a
respect connection flow control window in StreamFrameQueue
2016-07-06 10:17:42 +02:00
Marten Seemann
1b732a4afa
add method to FlowControlManager to tell if Stream contribues to connection-level flow control
2016-07-06 10:17:42 +02:00