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
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
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
aa091fe672
remove unneeded tracking variables from streams, optimize memory layout ( #3699 )
...
* remove the closedForShutdown boolean in the send stream
* remove the canceledWrite boolean in the send stream
* remove the closedForShutdown boolean in the receive stream
* remove the canceledRead boolean in the receive stream
* remove the resetRemotely boolean in the receive stream
* optimize memory layout of the receiveStream
This brings it down from 200 to 192 bytes.
2023-02-13 13:57:00 -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
2aa71ff76b
use a sync.Pool for ackhandler.Frames ( #3656 )
2023-01-17 23:15:02 -08:00
Toby
5fe9f9bd89
chore: fix multiple typos in comments ( #3612 )
...
* chore: fix multiple typos I run into
* Update conn_id_generator_test.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Update internal/ackhandler/sent_packet_handler_test.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-11-06 10:59:16 -08:00
Marten Seemann
43bde14cf7
implement generic Min and Max functions
2022-08-10 14:59:05 +02:00
Marten Seemann
8bcb6337d1
protect against concurrent use of Stream.Write ( #3381 )
2022-04-25 03:58:24 -07: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
8752576f26
run gofumpt, enable the gofumpt linter
2020-10-26 09:33:35 +07: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
84f7a9dfdd
bundle small writes on streams
2020-05-12 12:36:32 +07:00
Marten Seemann
93cee1e07b
stop the deadline timer in Stream.Read and Write
2020-05-03 11:22:58 +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
d93afcac53
cancel the stream context as early as possible
2019-10-30 12:21:38 +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
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