Commit graph

102 commits

Author SHA1 Message Date
Gaukas Wang
856bc02b8f
Merge branch 'upstream' into sync-upstream 2023-08-28 14:12:03 -06:00
Marten Seemann
2797f85fc0
switch from unmaintained golang/mock to go.uber.org/mock (#4050) 2023-08-28 02:23:55 -07:00
Gaukas Wang
95575f5fe7
break: update repo url [ci skip]
uTLS is not yet bumped to the new version, so this commit breaks the dependencies relationship by getting rid of the local replace.
2023-08-03 18:58:52 -06:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
d4a0793b6a remove unused version parameter from streams map constructor 2023-01-18 20:52:00 +13:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
4f85f45f0a stop using net.Error.Temporary in tests 2022-04-02 20:31:08 +01:00
Marten Seemann
592fb9cad9 introduce a dedicated qerr.TransportError and qerr.ApplicationError 2021-05-01 09:38:48 +07:00
Marten Seemann
7cd4dea764 update the flow control windows of streams opened in 0-RTT
The server might have increased the initial flow control window. We need
to make sure to inform all streams opened during during the 0-RTT
period.
2021-03-12 15:09:50 +08:00
Marten Seemann
8b63039664 add a function to reset the streams map after 0-RTT rejection 2021-03-09 17:59:49 +08:00
Marten Seemann
8a0b1dd78d remove unused error return value from HandleMaxStreamsFrame 2021-03-07 12:36:50 +08:00
Marten Seemann
c7d3aeea3d move the transport parameter stream limit check to the parser 2020-12-18 13:00:33 +07:00
Marten Seemann
0ef4f06189 move the transport parameters from the handshake to the wire package 2020-03-13 16:20:11 +07:00
Marten Seemann
2c2b5da612
Merge pull request #2209 from lucas-clemente/stream-count-errors
throw FRAME_ENCODING_ERRORs when MAX_STREAMs and STREAMS_BLOCKED frame exceed the maximum stream count
2019-11-09 11:37:23 +07:00
Marten Seemann
1e7c7842b9 move overflow check in MAX_STREAMS frame to frame parser 2019-11-08 11:44:56 +07:00
Marten Seemann
4b58bc0d07 make the stream deletion error message more specific 2019-11-08 11:09:54 +07:00
Marten Seemann
394ff04fb1 fix error message for stream deletion errors 2019-11-08 11:00:43 +07:00
Marten Seemann
5550ba2c3b add a context to Session.Accept{Uni}Stream 2019-06-22 19:37:11 +08:00
Marten Seemann
857e4ae9a9 use stream numbers, not stream ids, in the stream maps 2019-06-05 20:01:51 +08:00
Marten Seemann
a8633a952c introduce a type for the stream number 2019-06-05 17:45:17 +08:00
Marten Seemann
51c9c42adc reject transport parameters with too large stream counts 2019-04-01 11:58:18 +09:00
Marten Seemann
7b02b87026 reject MAX_STREAMS frames with too large stream counts 2019-04-01 11:57:23 +09:00
Marten Seemann
9c09e84765 use IETF QUIC transport error codes 2019-03-06 13:43:18 +09:00
Marten Seemann
f17ddffb70 don't delete a stream until it has been accepted 2019-01-23 17:24:10 +07:00
Marten Seemann
a2e48e204b return a net.Error when opening streams
net.Error.Temporary() will be true if no stream can be opened when the
peer's stream limit is reached.
2019-01-06 17:18:43 +07:00
Marten Seemann
c37b698f68
Merge pull request #1596 from lucas-clemente/internalize-errors
internalize the qerr package
2018-11-12 15:54:39 +07:00
Marten Seemann
3ffea5d8c4 internalize the qerr package 2018-11-11 12:44:16 +07:00
Marten Seemann
9518c90c0a implement and use the MAX_STREAMS frame 2018-11-10 09:38:50 +07:00
Marten Seemann
e8de94485c move more stream ID logic to the protocol package 2018-11-10 09:05:33 +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
b40942d39e send stream counts, not stream IDs, in the transport parameters 2018-03-16 17:41:21 +00:00
Marten Seemann
58b20c6009 make the number of incoming streams configurable, for IETF QUIC 2018-02-23 22:15:31 +08:00
Marten Seemann
1ec720f2f2 implement sending of STREAM_ID_BLOCKED frames 2018-02-06 10:04:40 +08:00
Marten Seemann
8e332c2e13 implement sending of MAX_STREAM_ID frames
We can now impose a limit on the number of stream for IETF QUIC, and
advertise that in the transport parameters during the handshake.
2018-02-06 08:32:16 +08:00
Marten Seemann
46e20ce8c9 implement handling of MAX_STREAM_ID frames 2018-02-06 08:30:58 +08:00
Marten Seemann
02949853f7 use the new stream maps for the IETF QUIC streams map 2018-02-06 07:53:34 +08:00
Marten Seemann
fa4724c8eb remove counting of streams from the IETF streamsMap
Streams have to be counted to enforce the max stream limit. We don't
advertise a max stream limit in the TLS handshake yet, so this never
worked for IETF QUIC. Removing this will make implementing
unidirectional streams easier.
2018-01-10 08:56:15 +07:00
Marten Seemann
a20e94ee16 use separate streamsMaps for gQUIC and IETF QUIC
This is a lot of duplicate code for now, but it will make moving towards
the new stream ID mapping in IETF QUIC (and unidirectional streams) much
easier.
2018-01-10 08:56:15 +07:00
Marten Seemann
7a3209b3a4 return a Stream, not streamI, from streamsMap Open and Accept methods 2018-01-10 08:53:17 +07:00
Marten Seemann
b687dd774f remove the Range method in the streamsMap
streamsMap.Range was only used to pass the stream flow control window to
all open streams after receiving the peer's transport parameters. It's
easier to pass the transport parameters to the streamsMap directly.
2018-01-03 16:18:53 +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
38281575a2 don't create stream 1 in the streamsMap on GetOrOpenStream (for gQUIC) 2018-01-02 23:57:20 +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
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
e926b0805a split the stream into a receive and a send stream 2017-12-20 10:05:02 +07:00
Marten Seemann
8c5741ae79 rename stream.Cancel to stream.CloseForShutdown 2017-12-14 17:30:44 +07:00
Marten Seemann
759b0d87b1 refactor packet unpacking
This replaces version.UsesMaxDataFrame by versoin.UsesIETFFrameFormat.
That way, we can have two separate code paths in the unpacker to unpack
either gQUIC frames or IETF frames.
2017-12-08 09:18:54 +07:00
Marten Seemann
128eb13d0c fix counting of incoming and outgoing streams for the client 2017-12-05 16:36:21 +07:00
Marten Seemann
b286aae7a4 refactor stream ID parity check in the streams map
No functional change expected.
2017-12-05 15:30:52 +07:00