Skip to content

Commit

Permalink
quic: add Conn.ConnectionState
Browse files Browse the repository at this point in the history
Add a method that returns the tls.ConnectionState for a connection.
Generally useful, and also required to let HTTP/3 expose the
ConnectionState in Requests.

Change-Id: Iba725e0f40c68020fc6ee45d49f5c609a2b6b493
Reviewed-on: https://go-review.googlesource.com/c/net/+/647075
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
neild authored and gopherbot committed Feb 25, 2025
1 parent b4c8655 commit 0d7dc54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quic/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ func (c *Conn) RemoteAddr() netip.AddrPort {
return c.peerAddr
}

// ConnectionState returns basic TLS details about the connection.
func (c *Conn) ConnectionState() tls.ConnectionState {
return c.tls.ConnectionState()
}

// confirmHandshake is called when the handshake is confirmed.
// https://www.rfc-editor.org/rfc/rfc9001#section-4.1.2
func (c *Conn) confirmHandshake(now time.Time) {
Expand Down

0 comments on commit 0d7dc54

Please sign in to comment.