Skip to content

Commit 0d7dc54

Browse files
neildgopherbot
authored andcommitted
quic: add Conn.ConnectionState
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 <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent b4c8655 commit 0d7dc54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

quic/conn.go

+5
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ func (c *Conn) RemoteAddr() netip.AddrPort {
186186
return c.peerAddr
187187
}
188188

189+
// ConnectionState returns basic TLS details about the connection.
190+
func (c *Conn) ConnectionState() tls.ConnectionState {
191+
return c.tls.ConnectionState()
192+
}
193+
189194
// confirmHandshake is called when the handshake is confirmed.
190195
// https://www.rfc-editor.org/rfc/rfc9001#section-4.1.2
191196
func (c *Conn) confirmHandshake(now time.Time) {

0 commit comments

Comments
 (0)