Update Yggdrasil P2P demo (also remove QUIC dependency)

This commit is contained in:
Neil Alexander 2022-03-16 16:49:10 +00:00
parent e30aa38fb0
commit 047147a3af
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 16 additions and 132 deletions

View file

@ -26,7 +26,6 @@ import (
"os"
"strings"
"github.com/lucas-clemente/quic-go"
"github.com/matrix-org/gomatrixserverlib"
"github.com/neilalexander/utp"
@ -44,7 +43,6 @@ type Node struct {
config *yggdrasilconfig.NodeConfig
multicast *yggdrasilmulticast.Multicast
log *gologme.Logger
listener quic.Listener
utpSocket *utp.Socket
incoming chan net.Conn
}

View file

@ -37,12 +37,12 @@ func (n *Node) Accept() (net.Conn, error) {
// Implements net.Listener
func (n *Node) Close() error {
return n.listener.Close()
return n.utpSocket.Close()
}
// Implements net.Listener
func (n *Node) Addr() net.Addr {
return n.listener.Addr()
return n.utpSocket.Addr()
}
// Implements http.Transport.Dial