1
0
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:
Juan Batiz-Benet
2014-09-11 00:58:35 -07:00
committed by Brian Tiger Chow
parent 5c79fc48e2
commit c59125b64c
2 changed files with 7 additions and 5 deletions

View File

@ -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)

View File

@ -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) {