forked from quic-go/quic-go
expose the QUIC version of a connection (#3620)
* Expose the QUIC version of a connection via connection state * Update interface.go Co-authored-by: Marten Seemann <martenseemann@gmail.com> * Finish rename * gofmt * Use public type for version number Co-authored-by: Marten Seemann <martenseemann@gmail.com>
This commit is contained in:
@@ -738,6 +738,7 @@ func (s *connection) ConnectionState() ConnectionState {
|
|||||||
return ConnectionState{
|
return ConnectionState{
|
||||||
TLS: s.cryptoStreamHandler.ConnectionState(),
|
TLS: s.cryptoStreamHandler.ConnectionState(),
|
||||||
SupportsDatagrams: s.supportsDatagrams(),
|
SupportsDatagrams: s.supportsDatagrams(),
|
||||||
|
Version: s.version,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -331,6 +331,7 @@ type Config struct {
|
|||||||
type ConnectionState struct {
|
type ConnectionState struct {
|
||||||
TLS handshake.ConnectionState
|
TLS handshake.ConnectionState
|
||||||
SupportsDatagrams bool
|
SupportsDatagrams bool
|
||||||
|
Version VersionNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
// A Listener for incoming QUIC connections
|
// A Listener for incoming QUIC connections
|
||||||
|
|||||||
Reference in New Issue
Block a user