From b7d7a8447d2d143ff3d46fc55c8919b4d5d37288 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 6 May 2017 11:39:20 +0800 Subject: [PATCH] remove the ConnState and the ConnStateCallback from the quic.Config --- interface.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/interface.go b/interface.go index 92dd8c92..b2fa3465 100644 --- a/interface.go +++ b/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.