introduce Transport.ConnContext, use client's context on the connection (#4507)

* introduce Transport.ConnContext, use client's context on the connection

* panic if ConnContext returns nil
This commit is contained in:
Marten Seemann
2024-05-27 12:30:19 +08:00
committed by GitHub
parent e2fbf3cdcd
commit 0d1e27d77c
15 changed files with 260 additions and 97 deletions

View File

@@ -1,6 +1,7 @@
package handshake
import (
"context"
"crypto/tls"
"errors"
"io"
@@ -91,7 +92,7 @@ type Event struct {
// CryptoSetup handles the handshake and protecting / unprotecting packets
type CryptoSetup interface {
StartHandshake() error
StartHandshake(context.Context) error
io.Closer
ChangeConnectionID(protocol.ConnectionID)
GetSessionTicket() ([]byte, error)