1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 23:42:20 +08:00

net: move Network implementation to own pkg

I needed the network implementation in its own
package, because I'll be writing several services that
will plug into _it_ that shouldn't be part of the core net
package. and then there were dependency conflicts. yay.
mux + identify are good examples of what i mean.
This commit is contained in:
Juan Batiz-Benet
2014-12-24 10:17:26 -08:00
parent 45a1ff0018
commit 4807127def
13 changed files with 165 additions and 150 deletions

View File

@ -14,7 +14,7 @@ import (
dssync "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
inet "github.com/jbenet/go-ipfs/net"
ipfsnet "github.com/jbenet/go-ipfs/net/ipfsnet"
peer "github.com/jbenet/go-ipfs/peer"
routing "github.com/jbenet/go-ipfs/routing"
u "github.com/jbenet/go-ipfs/util"
@ -49,7 +49,7 @@ func setupDHT(ctx context.Context, t *testing.T, addr ma.Multiaddr) *IpfsDHT {
peerstore.AddPubKey(p, pk)
peerstore.AddAddress(p, addr)
n, err := inet.NewNetwork(ctx, []ma.Multiaddr{addr}, p, peerstore)
n, err := ipfsnet.NewNetwork(ctx, []ma.Multiaddr{addr}, p, peerstore)
if err != nil {
t.Fatal(err)
}