Skip to content

Commit

Permalink
expose the QUIC version of a connection (#3620)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
MarcoPolo and marten-seemann committed Nov 15, 2022
1 parent 7b211d6 commit f2d3cb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ func (s *connection) ConnectionState() ConnectionState {
return ConnectionState{
TLS: s.cryptoStreamHandler.ConnectionState(),
SupportsDatagrams: s.supportsDatagrams(),
Version: s.version,
}
}

Expand Down
1 change: 1 addition & 0 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ type Config struct {
type ConnectionState struct {
TLS handshake.ConnectionState
SupportsDatagrams bool
Version VersionNumber
}

// A Listener for incoming QUIC connections
Expand Down

0 comments on commit f2d3cb8

Please sign in to comment.