implement the new Retry mechanism

This commit is contained in:
Marten Seemann
2018-08-12 10:41:56 +07:00
parent d8aa49d0f9
commit f88b7bb175
23 changed files with 401 additions and 1082 deletions

View File

@@ -2,7 +2,6 @@ package handshake
import (
"crypto/x509"
"io"
"github.com/bifurcation/mint"
"github.com/lucas-clemente/quic-go/internal/crypto"
@@ -15,6 +14,12 @@ type Sealer interface {
Overhead() int
}
// mintTLS combines some methods needed to interact with mint.
type mintTLS interface {
crypto.TLSExporter
Handshake() mint.Alert
}
// A TLSExtensionHandler sends and received the QUIC TLS extension.
// It provides the parameters sent by the peer on a channel.
type TLSExtensionHandler interface {
@@ -23,18 +28,6 @@ type TLSExtensionHandler interface {
GetPeerParams() <-chan TransportParameters
}
// MintTLS combines some methods needed to interact with mint.
type MintTLS interface {
crypto.TLSExporter
// additional methods
Handshake() mint.Alert
State() mint.State
ConnectionState() mint.ConnectionState
SetCryptoStream(io.ReadWriter)
}
type baseCryptoSetup interface {
HandleCryptoStream() error
ConnectionState() ConnectionState