add in connmgr interfaces
@@ -5,6 +5,7 @@ import (
"io"
logging "github.com/ipfs/go-log"
+ connmgr "github.com/libp2p/go-libp2p-connmgr"
host "github.com/libp2p/go-libp2p-host"
inet "github.com/libp2p/go-libp2p-net"
peer "github.com/libp2p/go-libp2p-peer"
@@ -20,11 +21,13 @@ var log = logging.Logger("blankhost")
type BlankHost struct {
n inet.Network
mux *mstream.MultistreamMuxer
+ cmgr connmgr.ConnManager
}
func NewBlankHost(n inet.Network) *BlankHost {
bh := &BlankHost{
n: n,
+ cmgr: connmgr.NewConnManager(0, 0, 0),
mux: mstream.NewMultistreamMuxer(),
}
@@ -139,3 +142,7 @@ func (bh *BlankHost) Mux() *mstream.MultistreamMuxer {
func (bh *BlankHost) Network() inet.Network {
return bh.n
}
+
+func (bh *BlankHost) ConnManager() connmgr.ConnManager {
+ return bh.cmgr
+}
