Commit graph

62 commits

Author SHA1 Message Date
Gaukas Wang
4973374ea5
sync: quic-go 0.42.0
Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-04-23 22:34:55 -06:00
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
Ferdinand Holzer
27301f791f
surface stream error as stream context cancelation cause (#3970)
* send stream: surface error as stream context cancellation cause

* Update send_stream_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-07-19 10:12:01 -07:00
Marten Seemann
0662afba63
stop using math/rand.Seed and Read in tests, bump go.mod version to 1.20 (#3936) 2023-07-01 11:29:41 -07:00
Marten Seemann
e1bcedc78c
ackhandler: use a frame handler interface for OnAcked / OnLost of all frame types (#3888) 2023-06-04 13:04:28 -07:00
Marten Seemann
f8d24ef1e9
don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07:00
Marten Seemann
f36690ae9c
protocol: remove VersionWhatever, previously used for testing (#3763) 2023-04-19 06:19:27 -07:00
Marten Seemann
dd6f34099b
fix flaky send stream test (#3678) 2023-02-13 02:49:30 -08:00
Marten Seemann
3f9d8feab2
return StreamErrors for all kinds of stream cancelations (#3681)
* fix: return typed errors when after cancelling actions

This is errors.Is'ed by libp2p and the fmt.Errorf messages didn't passed that test:
82315917f7/p2p/transport/quic/stream.go (L23)

* replace StreamErrorAction with a local / remote flag

Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2023-01-26 12:58:06 -08: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
1646fd545e refactor send stream to remove version from constructor 2023-01-18 20:51:59 +13:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
90727cb41a introduce a quic.StreamError type and use it for stream cancelations 2021-05-01 09:39:52 +07:00
Marten Seemann
f5238bf7b1 move the ApplicationErrorCdoe to the qerr package 2021-05-01 09:38:49 +07:00
Marten Seemann
c27f5a55b3 rename sendStream.handleMaxStreamDataFrame to updateSendWindow 2021-03-12 13:36:23 +08:00
Marten Seemann
82ac6dcf6d rename MaxReceivePacketSize to MaxPacketBufferSize
We use the same buffer size for sending and receiving packets.
2021-03-03 12:00:14 +08:00
Marten Seemann
b5615db612 complete a stream that has frames in flight if it is canceled 2021-01-17 15:54:33 +08:00
Marten Seemann
838dd6e81a rename StreamFrame.FinBit to Fin 2020-07-02 16:41:43 +07:00
Marten Seemann
865332015c rename ResetStreamFrame.ByteOffset to FinalSize 2020-07-02 16:41:43 +07:00
Marten Seemann
cc340b2887 rename StreamDataBlockedFrame.DataLimit to MaximumStreamData 2020-07-02 16:41:43 +07:00
Marten Seemann
5466de6565 rename MaxStreamDataFrame.ByteOffset to MaximumStreamData 2020-07-02 16:41:43 +07:00
Marten Seemann
4ff3af3305 gracefully handle concurrent stream writes and cancellations
If the complete slice passed to Stream.Write() is sent out, and the
stream is canceled concurrently (either by calling Stream.CancelWrite()
or by receiving a STOP_SENDING frame), we don't need to return an error
for the Write() call.
2020-06-23 13:07:28 +07:00
Marten Seemann
1cd1c3f54d
Merge pull request #2538 from lucas-clemente/bundle-small-writes
bundle small writes on streams
2020-05-14 11:51:34 +07:00
Marten Seemann
84f7a9dfdd bundle small writes on streams 2020-05-12 12:36:32 +07:00
Marten Seemann
d1c6d808b0 add a send stream test that randomly acknowledges and loses data 2020-05-11 10:05:39 +07:00
Marten Seemann
9905774c40 make it more likely that a STREAM frame is bundled with the FIN 2020-05-01 10:07:31 +07:00
Marten Seemann
7b1c4e7d80 don't dequeue retransmitted STREAM frames after the stream was canceled 2020-04-17 10:06:42 +07:00
Marten Seemann
599d937966 make Stream.Close() a no-op after the stream was closed for shutdown 2020-03-25 16:48:32 +07:00
Marten Seemann
6b22f36d82 add the stylecheck linter 2019-09-17 13:50:19 +07:00
Marten Seemann
4cb8bf3101 put STREAM frames back into the pool when they are acknowledged 2019-09-07 16:31:52 +07:00
Marten Seemann
4cfbb2f134 use STREAM frames from the buffer for sending data 2019-09-07 16:31:52 +07:00
Marten Seemann
94ab4e8d24 cancel retransmissions for streams that were reset 2019-08-31 17:37:20 +07:00
Marten Seemann
f49451ce3c queue lost STREAM frames in the stream's retransmission queue 2019-08-31 17:36:16 +07:00
Marten Seemann
0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 2019-08-31 17:34:54 +07:00
Marten Seemann
93d5d15e3b implement a STREAM frame retransmission queue in the sendStream 2019-08-31 17:34:54 +07:00
Marten Seemann
2836442a65 copy error code from the STOP_SENDING frame to the RESET_STREAM frame 2019-08-31 12:51:02 +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
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
e0a7b50edf use a time.Timer for write deadlines 2018-10-20 10:12:03 +09: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
37aa577560 run ineffassign in gometalinter 2018-02-23 22:39:08 +08: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
f2a1206c20 fix flaky send stream test 2018-01-03 09:32:09 +07:00