Marten Seemann
46fc42d0da
only declare send stream completed when RESET_STREAM is acknowledged ( #4613 )
2024-08-06 16:55:36 -07:00
Marten Seemann
af9fa7a555
queue stream-related control frames in the respective stream ( #4610 )
...
* use a separate method for queueing control frames from the streams map
* queue stream-related control frames in the respective stream
2024-08-04 15:42:56 -07:00
Marten Seemann
b8ea5c7981
simplify generation of STREAM_DATA_BLOCKED frames ( #4608 )
...
The stream always gets blocked at the current write offset. There's no
need to return this offset from the flow controller.
2024-08-01 13:08:09 -07:00
sukun
8d821f4bc8
mark stream completed when CancelWrite is called after receiving STOP_SENDING ( #4605 )
...
* garbage collect stream when CancelWrite is called after receiving STOP_SENDING
* review comments
* Hold lock while checking isNewlyCompleted
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io >
2024-08-01 13:07:06 -07:00
Marten Seemann
42f04d4e02
refactor frame packing to logic to not access the streams map ( #4596 )
...
* avoid accessing the streams map when packing stream data
* avoid accessing the streams map when packing flow control frames
* remove streamGetter interface
2024-07-28 12:32:54 -07:00
Marten Seemann
723a188dde
remove unneeded stream context cancellation on shutdown ( #4535 )
...
The connection already cancels the base context, so we don't need to manually
cancel the stream context (which is derived from the connection context).
2024-05-27 21:43:27 -07:00
Marten Seemann
bff131e546
delay completion of the send stream until the reset error was delivered ( #4445 )
...
* delay completion of the send stream until the reset error was delivered
* mark the send stream completed on Close after receiving a STOP_SENDING
* fix handling of STOP_SENDING after Close
2024-04-26 08:31:00 -07:00
Marten Seemann
e310b80cf3
expose the connection tracing ID on the stream context ( #4414 )
...
This is especially interesting for HTTP servers: They can now learn
which connection a request was received on.
2024-04-06 07:41:25 -07:00
Marten Seemann
198de32ef6
don't enqueue stream for sending on reordered MAX_STREAM_DATA frames ( #4269 )
2024-02-02 22:02:13 -08:00
Marten Seemann
2797f85fc0
switch from unmaintained golang/mock to go.uber.org/mock ( #4050 )
2023-08-28 02:23:55 -07: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