Commit Graph

196 Commits

Author SHA1 Message Date
Marten Seemann
f8e5a13c7d use a gomock congestion in tests 2018-01-09 16:42:44 +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
15ab0ae443 add a HasWindowUpdate method to the stream flow controller 2017-12-21 18:58:55 +07:00
Marten Seemann
d4f904b55b regenerate all gomocks after gomock output format was changed
No functional change expected.
2017-12-21 17:30:51 +07:00
Marten Seemann
f2a6c25124 remove unneeded mockgen command 2017-12-21 13:38:13 +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
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
bb093d82f1 Merge pull request #1025 from lucas-clemente/fix-964
ignore STOP_WAITINGs, derive lower bound for packets to include in ACK
2017-12-14 19:38:28 +07:00
Marten Seemann
8e0060c51b ignore STOP_WAITINGs, derive lower bound for packets to include in ACK 2017-12-14 19:23:06 +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
8833e4f4af use a gomock ReceivedPacketHandler in the session tests 2017-12-14 12:28:40 +07:00
Marten Seemann
5c7fb54445 use a gomock SentPacketHandler in the session tests 2017-12-14 12:28:40 +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
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
3f62ea8673 set the Long Header packet type based on the state of the handshake 2017-10-29 14:08:08 +07:00
Marten Seemann
3e39991e1e use the non-blocking of mint to cycle through the handshake 2017-10-27 22:54:40 +07:00
Marten Seemann
ddea1d83ab use gomock to mock crypto.AEAD in the crypto setup tests 2017-10-27 17:35:08 +07:00
Marten Seemann
268c3859fc remove the flow control manager 2017-10-20 21:34:09 +07:00
Marten Seemann
6dc453caa3 use mockgen reflect mode
This requires a dirty hack to get mockgen to generate mocks for internal
packages.
2017-10-20 21:12:19 +07:00
Marten Seemann
e087ee7e9f handle WINDOW_UPDATEs for streams and connection separately
In IETF QUIC, stream 0 is a valid stream ID, and is not used to encode
WINDOW_UPDATEs for the connection any more.
2017-10-20 21:12:19 +07:00
Marten Seemann
f3e9bf4332 remove the params negotiator 2017-10-20 18:08:21 +07:00
Marten Seemann
480db80da1 remove the receive flow control window from the params negotiator
The receive windows are not negotiated, they are just announced to the
peer.
2017-10-20 17:35:30 +07:00
Marten Seemann
daff6256b9 don't negotiate the maximum incoming streams value
The maximum number of incoming streams doesn't need to be negotiated. It
is a value that is only announced by the peer, and has to be respected.
Furthermore, Chrome doesn't seem to care about the MSPC value anymore
(since MIDS was introduced), so there's no need to send this in the
handshake any more.
2017-10-20 17:35:30 +07:00
Marten Seemann
0e1a8a5f8c move the max flow control increments out of the params negotiator
The params negotiator was just keeping track of the value set in the
quic.Config. The max flow control increments are not subject to
negotiation, but an independent implementation decision of every peer.
2017-10-04 07:16:16 -07:00
Marten Seemann
0ffb64b5d7 rename the IdleConnectionStateLifetime to RemoteIdleTimeout 2017-10-03 10:48:08 -07:00
Marten Seemann
9cb7480050 rename connection ID truncation to connection ID omission 2017-09-29 22:52:54 +07:00
Marten Seemann
c95f2054a8 rename the ConnectionParametersManager to ParamsNegotiator 2017-09-28 18:15:33 +07:00
Marten Seemann
ebb4150e63 separate connection parameters negotiation and gQUIC handshake parsing 2017-09-28 18:15:32 +07:00
Marten Seemann
d0a94bb8be use mockgen source mode instead of reflect mode
In reflect mode, mockgen imports the package. Since we recently made
the packages internal, this fails, so we have to use source mode instead.
2017-09-28 15:18:14 +07:00
Marten Seemann
e603715949 make handshake and crypto internal packages 2017-09-21 11:52:21 +07:00
Marten Seemann
95a971f322 make the flow control package internal 2017-08-30 00:27:44 +07:00
Marten Seemann
f1ada87dcf make the protocol package internal 2017-08-30 00:19:44 +07:00
Lucas Clemente
8b6a662223 Move flow control mocks to a separate package
This allows the other mocks to be used in the FC tests.
2017-06-09 12:08:26 +02:00
Lucas Clemente
050358bbc5 Mock CPM in streams map using gomock 2017-06-09 11:58:09 +02:00
Lucas Clemente
eeb2d8d821 Mock FlowControlManager using gomock 2017-06-08 16:06:31 +02:00