From 904a522eb8dd5293fbc10a96b53ae75256745390 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Mon, 14 Nov 2022 13:52:18 -0800 Subject: [PATCH 1/5] Expose the QUIC version of a connection via connection state --- connection.go | 1 + interface.go | 1 + 2 files changed, 2 insertions(+) diff --git a/connection.go b/connection.go index c761080bd17..db82bf18726 100644 --- a/connection.go +++ b/connection.go @@ -738,6 +738,7 @@ func (s *connection) ConnectionState() ConnectionState { return ConnectionState{ TLS: s.cryptoStreamHandler.ConnectionState(), SupportsDatagrams: s.supportsDatagrams(), + QUICVersion: s.version, } } diff --git a/interface.go b/interface.go index 78c731e2191..f4a93332028 100644 --- a/interface.go +++ b/interface.go @@ -331,6 +331,7 @@ type Config struct { type ConnectionState struct { TLS handshake.ConnectionState SupportsDatagrams bool + QUICVersion protocol.VersionNumber } // A Listener for incoming QUIC connections From 54844d395ae5e2a99d3a1bc0860278d138fe6fa6 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Mon, 14 Nov 2022 17:50:53 -0800 Subject: [PATCH 2/5] Update interface.go Co-authored-by: Marten Seemann --- interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface.go b/interface.go index f4a93332028..878389e9113 100644 --- a/interface.go +++ b/interface.go @@ -331,7 +331,7 @@ type Config struct { type ConnectionState struct { TLS handshake.ConnectionState SupportsDatagrams bool - QUICVersion protocol.VersionNumber + Version protocol.VersionNumber } // A Listener for incoming QUIC connections From 1346dc331c7083ab6d337a4f8ae352b046ae3086 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Mon, 14 Nov 2022 17:51:34 -0800 Subject: [PATCH 3/5] Finish rename --- connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection.go b/connection.go index db82bf18726..0df45e78a05 100644 --- a/connection.go +++ b/connection.go @@ -738,7 +738,7 @@ func (s *connection) ConnectionState() ConnectionState { return ConnectionState{ TLS: s.cryptoStreamHandler.ConnectionState(), SupportsDatagrams: s.supportsDatagrams(), - QUICVersion: s.version, + Version: s.version, } } From d082960b9755dbf24cea6195fd647f3c6ad0f5b9 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Tue, 15 Nov 2022 07:24:30 -0800 Subject: [PATCH 4/5] gofmt --- interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface.go b/interface.go index 878389e9113..3c1342e21bf 100644 --- a/interface.go +++ b/interface.go @@ -331,7 +331,7 @@ type Config struct { type ConnectionState struct { TLS handshake.ConnectionState SupportsDatagrams bool - Version protocol.VersionNumber + Version protocol.VersionNumber } // A Listener for incoming QUIC connections From 559d22e8c51b8064e3cb37624f836274d0407859 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Tue, 15 Nov 2022 11:18:23 -0800 Subject: [PATCH 5/5] Use public type for version number --- interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface.go b/interface.go index 3c1342e21bf..611c3f56a4e 100644 --- a/interface.go +++ b/interface.go @@ -331,7 +331,7 @@ type Config struct { type ConnectionState struct { TLS handshake.ConnectionState SupportsDatagrams bool - Version protocol.VersionNumber + Version VersionNumber } // A Listener for incoming QUIC connections