146 Commits

Author SHA1 Message Date
gr1ffon
4ba42a8456 replace repo 2025-11-14 04:04:40 +03:00
Marten Seemann
adc13be540 implement a memory-optimized time.Time replacement (#5334)
* implement a memory-optimized time.Time replacement

* monotime: properly handle systems with bad timer resolution (Windows)

* monotime: simplify Since
2025-09-14 08:12:10 +02:00
Marten Seemann
a2926a3603 implement sender side behavior for RESET_STREAM_AT (#5242)
* improve existing send stream test

* implement sender side behavior for RESET_STREAM_AT

* refactor send stream cancelation and shutdown error handling

* correctly deal with 0-RTT corner case
2025-06-28 05:44:47 +02:00
Marten Seemann
eb656df2fe convert Stream interface to a struct (#5149) 2025-06-01 05:40:05 +02:00
Marten Seemann
3cb5f3e104 optimize packing of STREAM_DATA_BLOCKED frames (#4801)
* refactor the framer to pack both control and STREAM frames

* refactor framer STREAM frame packing logic

* pack STREAM_DATA_BLOCKED in the same packet as the STREAM frame

This makes debugging easier (and is slightly more efficient). In the
pathological case where there is not enough space remaning in the packet
to pack the STREAM_DATA_BLOCKED frame, it is queued for the next packet.

* add an integration test
2025-01-07 12:06:00 +08:00
Marten Seemann
0b9bd3c4de remove redundant bool return value from sendStream.popStreamFrame (#4828) 2024-12-31 13:51:14 +08:00
Marten Seemann
56bebc4e61 migrate the stream tests away from Ginkgo (#4799)
* translate the receive stream tests

* translate the send stream tests

* translate the stream tests
2024-12-28 15:06:24 +08:00
Marten Seemann
b493c5d827 migrate the transport tests away from Ginkgo (#4783)
* migrate the transport tests away from Ginkgo

* simplify mock net.PacketConn implementation
2024-12-23 14:47:44 +08:00
Marten Seemann
40a768e77b flowcontrol: avoid calling time.Now(), pass time as a function parameter (#4731) 2024-11-28 17:46:22 +08: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
58cedf7a4f rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
d972a5e8f2 remove unused version parameter from stream 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
62a906de3c update Go to 1.16, drop support for 1.14 2021-02-17 12:17:46 +08:00
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07: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
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
fc8fafd15e pass a callback containing the callbacks to the stream 2017-12-20 11:49:05 +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
Marten Seemann
a0c4e28485 send and handle STOP_SENDING frames (for IETF QUIC) 2017-12-16 09:30:07 +07:00
Marten Seemann
d0b22e3439 refactor stream to support canceling Read and Write 2017-12-16 09:10:24 +07:00
Marten Seemann
93e99e239c Merge pull request #1030 from lucas-clemente/fix-1029
when the stream write deadline expires, return the data length written
2017-12-14 23:13:44 +07:00
Marten Seemann
34ad9f9e63 when the stream write deadline expires, return the data length written 2017-12-14 19:25:36 +07:00
Marten Seemann
448928fc63 Merge pull request #1028 from lucas-clemente/fix-986
add the offset to the BLOCKED and STREAM_BLOCKED frames
2017-12-14 19:21:05 +07:00
Marten Seemann
00edfb7461 set the offset in BLOCKED and STREAM_BLOCKED frames 2017-12-14 19:04:17 +07:00
Marten Seemann
8c5741ae79 rename stream.Cancel to stream.CloseForShutdown 2017-12-14 17:30:44 +07:00
Marten Seemann
03977c1a25 pass RST_STREAM frames directly to the stream 2017-12-14 17:00:41 +07:00
Marten Seemann
2d31440510 pass MAX_STREAM_DATA frames directly to the stream 2017-12-14 16:50:47 +07:00
Marten Seemann
823098d6e2 rename stream.AddStreamFrame to stream.HandleStreamFrame 2017-12-14 16:50:47 +07:00
Marten Seemann
bd77f3081c directly queue RST_STREAM frames on stream.Reset 2017-12-13 17:40:46 +07:00
Marten Seemann
73ab97aa95 simplify the stream by directly popping STREAM frames from it 2017-12-12 18:48:08 +07:00
Marten Seemann
cd5e7ae177 remove unneeded function from the crypto stream interface 2017-12-12 18:30:08 +07:00
Marten Seemann
8e8892b064 remove the SentFin method from the stream
When a FIN is dequeued from the stream by the streamFramer, it is
guaranteed to be sent out. There's no need to explicitely signal that to
the stream.
2017-12-08 14:05:16 +07:00
Marten Seemann
71af5758e2 remove the ShouldSendFin method from the stream
GetDataForWriting now has two return parameters: the data and if a FIN
should be sent.
2017-12-08 14:05:14 +07:00
Marten Seemann
085624be20 replace stream.LenOfDataForWriting by HasDataForWriting
The return value (the length of data for writing) was only used to
determine if the stream has data for writing. Therefore it's easier to
just return a bool.

No functional change expected.
2017-12-08 14:04:00 +07:00
Marten Seemann
25a6dc9654 implement stateless handling of Initial packets for the TLS server 2017-12-08 08:45:54 +07:00
Marten Seemann
f662822486 use stream 0 for the crypto stream when using TLS 2017-11-04 15:22:07 +07:00
Marten Seemann
268c3859fc remove the flow control manager 2017-10-20 21:34:09 +07:00
Marten Seemann
f3e9bf4332 remove the params negotiator 2017-10-20 18:08:21 +07:00
Marten Seemann
f1ada87dcf make the protocol package internal 2017-08-30 00:19:44 +07:00
Marten Seemann
ed522ebbce make wire an internal package 2017-08-29 23:51:56 +07:00
Marten Seemann
88afad8722 rename package frames to wire 2017-08-29 23:27:15 +07:00
Marten Seemann
8ef69143ba implement a context for the stream
The context is cancelled when the write-side of the stream is closed.
2017-08-02 11:28:17 +07:00