select the H3 ALPN based on the QUIC version in use (for the H3 server)

This commit is contained in:
Marten Seemann
2020-10-29 13:08:16 +07:00
parent b7652887d2
commit c968b18a21
10 changed files with 134 additions and 62 deletions

View File

@@ -3,6 +3,7 @@ package handshake
import (
"errors"
"io"
"net"
"time"
"github.com/lucas-clemente/quic-go/internal/protocol"
@@ -90,3 +91,10 @@ type CryptoSetup interface {
Get0RTTSealer() (LongHeaderSealer, error)
Get1RTTSealer() (ShortHeaderSealer, error)
}
// ConnWithVersion is the connection used in the ClientHelloInfo.
// It can be used to determine the QUIC version in use.
type ConnWithVersion interface {
net.Conn
GetQUICVersion() protocol.VersionNumber
}