lib/connections: Add SyscallConn() to quic conn (fixes #7551) (#7570)

This commit is contained in:
Simon Frei 2021-04-13 13:59:58 +02:00 committed by GitHub
parent f6df1a760d
commit 15d2dc3a4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import (
"strings"
"sync"
"sync/atomic"
"syscall"
"time"
"github.com/lucas-clemente/quic-go"
@ -223,7 +224,12 @@ type stunConnQUICWrapper struct {
underlying *net.UDPConn
}
// SetReadBuffer is required by QUIC.
// SetReadBuffer is required by QUIC < v0.20.0
func (s *stunConnQUICWrapper) SetReadBuffer(size int) error {
return s.underlying.SetReadBuffer(size)
}
// SyscallConn is required by QUIC
func (s *stunConnQUICWrapper) SyscallConn() (syscall.RawConn, error) {
return s.underlying.SyscallConn()
}