fix(netx): make sure we save quic udp conn events (#423)

https://github.com/ooni/probe-cli/pull/421 was wrong because we need
a more rich interface for quic-go to call ReadMsgUDP.

With this commit, we use such an interface: OOBCapablePacketConn.

Still part of https://github.com/ooni/probe/issues/1505.
This commit is contained in:
Simone Basso 2021-07-02 11:00:12 +02:00 committed by GitHub
commit ceb2aa8a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 82 additions and 49 deletions

View file

@ -1,13 +0,0 @@
// Package quicx contains definitions useful to implement QUIC.
package quicx
import "net"
// UDPConn is an UDP connection used by quic.
type UDPConn interface {
// PacketConn is the underlying base interface.
net.PacketConn
// ReadMsgUDP behaves like net.UDPConn.ReadMsgUDP.
ReadMsgUDP(b, oob []byte) (n, oobn, flags int, addr *net.UDPAddr, err error)
}