Marten Seemann
9b5a20e772
remove some unused functions
2019-02-27 19:31:53 +09:00
Marten Seemann
2787a6051a
remove some defer statements in the stream
2019-01-24 16:59:13 +07:00
Marten Seemann
3372fa794c
remove the error return value from Stream.CancelWrite
2019-01-24 16:00:12 +07:00
Marten Seemann
3808191679
make CancelWrite a no-op when called after closing the stream
2019-01-24 16:00:08 +07:00
Marten Seemann
8d73ebc5af
don't send more stream data after a stream was canceled
2019-01-23 12:47:17 +07:00
Marten Seemann
0be8e033ab
fix race conditions when setting read and write deadlines
2018-12-20 14:43:11 +06:30
Marten Seemann
01e37e005a
fix deadlock when closing and receiving MAX_STREAM_DATA frames
2018-12-18 20:55:31 +06:30
Marten Seemann
8761cee0ef
fix deadlock when sending stream data
2018-12-18 16:26:58 +06:30
Marten Seemann
466825eeb2
only copy stream data to write when popping a STREAM frame
...
stream.Write can be called with arbitrarily large slices of data. We
should avoid copying all that data up front since this can take a long
time. Instead, we can copy the data that is dequeued when a STREAM frame
is popped.
2018-12-18 14:35:48 +06:30
Marten Seemann
05ecf9bc02
rename the STREAM_BLOCKED frame to STREAM_DATA_BLOCKED
2018-11-10 09:05:27 +07:00
Marten Seemann
022189dfda
rename the RST_STREAM frame to RESET_STREAM frame
2018-11-04 12:26:02 +07:00
Marten Seemann
3266e36811
drop support for gQUIC
2018-10-30 10:20:39 +07:00
Marten Seemann
82508f1562
use tls-tris instead of mint
2018-10-26 16:18:49 +07:00
Marten Seemann
e0a7b50edf
use a time.Timer for write deadlines
2018-10-20 10:12:03 +09:00
Marten Seemann
25847cfc30
handle the crypto stream separately in the packet packer
2018-10-01 11:25:57 -07:00
Marten Seemann
8bd6168511
never increase the flow control limit for the crypto stream
2018-09-19 09:00:23 -04:00
Marten Seemann
50397a979c
only send BLOCKED frames if there is more data to send
2018-07-30 05:06:11 +07:00
Marten Seemann
83be64bb73
fix deadlock between onStreamCompleted and Session.Close
2018-06-01 13:05:30 +08:00
Marten Seemann
81974d30d6
run gosimple in gometalinter
2018-02-23 22:42:32 +08:00
Marten Seemann
5974c6c113
correctly determine the length of STREAM frames for IETF QUIC
...
The length of the data has an influence on the length of the frame (if
it contains the data length), and the length can either consume 1 or 2
bytes due to variable length encoding.
2018-02-05 12:02:49 +08:00
Marten Seemann
e802491a8f
create internal interfaces for send and receive streams
...
And use those for handling frames.
2018-01-10 08:56:13 +07:00
Marten Seemann
8a3f807a12
immediately delete a stream when it is completed
...
By introducing a callback to the stream, which the stream calls as soon
as it is completed, we can get rid of checking every single open stream
if it is completed.
2018-01-03 10:30:20 +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