From 6157c766dec430875817a9e3d8f341422e66d1f9 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Sun, 9 May 2021 20:15:10 +0200 Subject: [PATCH] lib/connections: Correct comments on quic wrapper type (#7652) --- lib/connections/quic_listen.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/connections/quic_listen.go b/lib/connections/quic_listen.go index 5c90cfff4..411368782 100644 --- a/lib/connections/quic_listen.go +++ b/lib/connections/quic_listen.go @@ -219,17 +219,18 @@ func (quicListenerFactory) Enabled(cfg config.Configuration) bool { return true } +// stunConnQUICWrapper provides methods used by quic. type stunConnQUICWrapper struct { net.PacketConn underlying *net.UDPConn } -// SetReadBuffer is required by QUIC < v0.20.0 func (s *stunConnQUICWrapper) SetReadBuffer(size int) error { + // https://github.com/lucas-clemente/quic-go/blob/master/packet_handler_map.go#L85 return s.underlying.SetReadBuffer(size) } -// SyscallConn is required by QUIC func (s *stunConnQUICWrapper) SyscallConn() (syscall.RawConn, error) { + // https://github.com/lucas-clemente/quic-go/blob/84e03e59760ceee37359688871bb0688fcc4e98f/conn_windows.go#L18 return s.underlying.SyscallConn() }