Marten Seemann
0311bff1f2
improve the send stream tests
2018-01-03 08:46:46 +07:00
Marten Seemann
5371f804f8
don't report blocked streams as active for sending data
2018-01-03 00:18:33 +07:00
Marten Seemann
d9c107b034
introduce a queue of active streams in the streamFramer
...
The queue holds all streams that have data to send. When stream.Write or
stream.Close are called, a stream is added to this queue. It is removed
from the queue when all available (at that moment) data was sent.
This way, we don't need the round robin scheduling (which, for every
packet sent, asked every single open stream if it had data) any more.
2018-01-02 23:24:44 +07:00
Marten Seemann
a5d3eaea61
rename the scheduleSending callback to onHasStreamData in the stream
...
This callback also takes the stream ID, which will later be used to
create a queue of streams that have data for writing available.
2018-01-02 23:24:44 +07:00
Marten Seemann
0d6032a065
call the scheduleSending callback when stream.Close is called
...
The stream needs to send the STREAM frame containing the FIN bit.
2017-12-21 21:10:17 +07:00
Marten Seemann
fc8fafd15e
pass a callback containing the callbacks to the stream
2017-12-20 11:49:05 +07:00
Marten Seemann
ea77974027
don't send data that was queue before the stream write deadline expired
2017-12-20 11:18:36 +07:00
Marten Seemann
d4b80bd8d0
don't schedule sending when stream.Write is called after the deadline
2017-12-20 10:59:09 +07:00
Marten Seemann
d2e31c04ab
generate the streamI mock in the quic package
...
By doing so, we can mock private methods of the stream, so they cannot
be type-asserted by users of quic-go.
2017-12-20 10:42:07 +07:00
Marten Seemann
092908d3e0
simplify sending of (connection-level) BLOCKED frames
2017-12-20 10:23:17 +07:00
Marten Seemann
d49ad2d0cc
queue STREAM_BLOCKED frames from the stream, when popping a STREAM frame
2017-12-20 10:23:01 +07:00
Marten Seemann
e926b0805a
split the stream into a receive and a send stream
2017-12-20 10:05:02 +07:00