forked from quic-go/quic-go
remove the ConnState and the ConnStateCallback from the quic.Config
This commit is contained in:
21
interface.go
21
interface.go
@@ -38,31 +38,10 @@ type Session interface {
|
||||
Close(error) error
|
||||
}
|
||||
|
||||
// ConnState is the status of the connection
|
||||
type ConnState int
|
||||
|
||||
const (
|
||||
// ConnStateInitial is the initial state
|
||||
ConnStateInitial ConnState = iota
|
||||
// ConnStateVersionNegotiated means that version negotiation is complete
|
||||
ConnStateVersionNegotiated
|
||||
// ConnStateSecure means that the connection is encrypted
|
||||
ConnStateSecure
|
||||
// ConnStateForwardSecure means that the connection is forward secure
|
||||
ConnStateForwardSecure
|
||||
)
|
||||
|
||||
// ConnStateCallback is called every time the connection moves to another connection state.
|
||||
type ConnStateCallback func(Session, ConnState)
|
||||
|
||||
// Config contains all configuration data needed for a QUIC server or client.
|
||||
// More config parameters (such as timeouts) will be added soon, see e.g. https://github.com/lucas-clemente/quic-go/issues/441.
|
||||
type Config struct {
|
||||
TLSConfig *tls.Config
|
||||
// ConnStateCallback will be called when the QUIC version is successfully negotiated or when the encryption level changes.
|
||||
// If this field is not set, the Dial functions will return only when the connection is forward secure.
|
||||
// Callbacks have to be thread-safe, since they might be called in separate goroutines.
|
||||
ConnState ConnStateCallback
|
||||
// The QUIC versions that can be negotiated.
|
||||
// If not set, it uses all versions available.
|
||||
// Warning: This API should not be considered stable and will change soon.
|
||||
|
||||
Reference in New Issue
Block a user