mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 09:34:03 +08:00
moved conn to own pkg
This commit is contained in:

committed by
Brian Tiger Chow

parent
5c79fc48e2
commit
c59125b64c
@ -29,8 +29,8 @@ type Conn struct {
|
||||
secOut chan<- []byte
|
||||
}
|
||||
|
||||
// ConnMap maps Keys (Peer.IDs) to Connections.
|
||||
type ConnMap map[u.Key]*Conn
|
||||
// Map maps Keys (Peer.IDs) to Connections.
|
||||
type Map map[u.Key]*Conn
|
||||
|
||||
// Dial connects to a particular peer, over a given network
|
||||
// Example: Dial("udp", peer)
|
@ -2,11 +2,13 @@ package swarm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
|
||||
mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
|
||||
peer "github.com/jbenet/go-ipfs/peer"
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
peer "github.com/jbenet/go-ipfs/peer"
|
||||
|
||||
ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
|
||||
mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
|
||||
)
|
||||
|
||||
func setupPeer(id string, addr string) (*peer.Peer, error) {
|
Reference in New Issue
Block a user