I was trying out the exact code in examples/standalone in my PC(Ubuntu), and it failed when run (go run . -listen). The error messages showed below.
# github.com/libp2p/go-libp2p-webrtc-direct
/home/root/go/pkg/mod/github.com/libp2p/go-libp2p-webrtc-direct@v0.0.0-20220114121551-711dccc4656f/conn.go:269:29: not enough arguments in call to muxer.NewConn
have (net.Conn, bool)
want (net.Conn, bool, network.PeerScope)
/home/root/go/pkg/mod/github.com/libp2p/go-libp2p-webrtc-direct@v0.0.0-20220114121551-711dccc4656f/listener.go:140:2: cannot use conn (type *Conn) as type transport.CapableConn in return argument:
*Conn does not implement transport.CapableConn (missing Scope method)
/home/root/go/pkg/mod/github.com/libp2p/go-libp2p-webrtc-direct@v0.0.0-20220114121551-711dccc4656f/transport.go:63:2: cannot use conn (type *Conn) as type transport.CapableConn in return argument:
*Conn does not implement transport.CapableConn (missing Scope method)
/home/root/go/pkg/mod/github.com/libp2p/go-libp2p-webrtc-direct@v0.0.0-20220114121551-711dccc4656f/webrtcdirect.go:16:5: cannot use &Conn{} (type *Conn) as type transport.CapableConn in assignment:
*Conn does not implement transport.CapableConn (missing Scope method)
Could anyone have a look at it and give me a hint where I did it wrong, please? Thank you.
Looks like you're running with a different set of dependencies. Please make sure to run with 1. an up to date Go version and 2. with the set of dependencies from go.mod.
Hi there,
I was trying out the exact code in examples/standalone in my PC(Ubuntu), and it failed when run (
go run . -listen
). The error messages showed below.Could anyone have a look at it and give me a hint where I did it wrong, please? Thank you.