refactor: cleaner way of passing a UDPConn around (#421)
* refactor: cleaner way of passing a UDPConn around Also part of https://github.com/ooni/probe/issues/1505 * Update internal/engine/netx/quicdialer/connectionstate.go
This commit is contained in:
parent
ec350cba1a
commit
250a595f89
9 changed files with 33 additions and 27 deletions
13
internal/quicx/quicx.go
Normal file
13
internal/quicx/quicx.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// 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)
|
||||
}
|
||||
Loading…
Reference in a new issue