-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quic: send more transport parameters
Send various transport parameters that we weren't sending yet, but should have been. Add a test for transport parameters sent by us. For golang/go#58547 Change-Id: Id16c46ee39040b091633aca8d4cff4c60562a603 Reviewed-on: https://go-review.googlesource.com/c/net/+/523575 Run-TryBot: Damien Neil <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
- Loading branch information
Showing
3 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2023 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
//go:build go1.21 | ||
|
||
package quic | ||
|
||
import "testing" | ||
|
||
func TestConfigTransportParameters(t *testing.T) { | ||
const ( | ||
wantInitialMaxStreamData = int64(2) | ||
) | ||
tc := newTestConn(t, clientSide, func(c *Config) { | ||
c.StreamReadBufferSize = wantInitialMaxStreamData | ||
}) | ||
tc.handshake() | ||
if tc.sentTransportParameters == nil { | ||
t.Fatalf("conn didn't send transport parameters during handshake") | ||
} | ||
p := tc.sentTransportParameters | ||
if got, want := p.initialMaxStreamDataBidiLocal, wantInitialMaxStreamData; got != want { | ||
t.Errorf("initial_max_stream_data_bidi_local = %v, want %v", got, want) | ||
} | ||
if got, want := p.initialMaxStreamDataBidiRemote, wantInitialMaxStreamData; got != want { | ||
t.Errorf("initial_max_stream_data_bidi_remote = %v, want %v", got, want) | ||
} | ||
if got, want := p.initialMaxStreamDataUni, wantInitialMaxStreamData; got != want { | ||
t.Errorf("initial_max_stream_data_uni = %v, want %v", got, want) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters