add a quic.Config option to ask the server to truncate the connection ID

This commit is contained in:
Marten Seemann
2017-05-10 00:00:45 +08:00
parent 650af86c70
commit 7a18b870e8
8 changed files with 64 additions and 6 deletions

View File

@@ -175,7 +175,17 @@ func newClientSession(
s.aeadChanged = aeadChanged
cryptoStream, _ := s.OpenStream()
var err error
s.cryptoSetup, err = handshake.NewCryptoSetupClient(hostname, connectionID, v, cryptoStream, config.TLSConfig, s.connectionParameters, aeadChanged, negotiatedVersions)
s.cryptoSetup, err = handshake.NewCryptoSetupClient(
hostname,
connectionID,
v,
cryptoStream,
config.TLSConfig,
s.connectionParameters,
aeadChanged,
&handshake.TransportParameters{RequestConnectionIDTruncation: config.RequestConnectionIDTruncation},
negotiatedVersions,
)
if err != nil {
return nil, err
}