refactor: move quicdialing base functionality to netxlite (#406)
Part of https://github.com/ooni/probe/issues/1505
This commit is contained in:
parent
c00cad1382
commit
925ca22b88
10 changed files with 254 additions and 84 deletions
13
internal/netxmocks/quic.go
Normal file
13
internal/netxmocks/quic.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package netxmocks
|
||||
|
||||
import "net"
|
||||
|
||||
// QUICListener is a mockable netxlite.QUICListener.
|
||||
type QUICListener struct {
|
||||
MockListen func(addr *net.UDPAddr) (net.PacketConn, error)
|
||||
}
|
||||
|
||||
// Listen calls MockListen.
|
||||
func (ql *QUICListener) Listen(addr *net.UDPAddr) (net.PacketConn, error) {
|
||||
return ql.MockListen(addr)
|
||||
}
|
||||
Loading…
Reference in a new issue