1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:30:39 +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 secOut chan<- []byte
} }
// ConnMap maps Keys (Peer.IDs) to Connections. // Map maps Keys (Peer.IDs) to Connections.
type ConnMap map[u.Key]*Conn type Map map[u.Key]*Conn
// Dial connects to a particular peer, over a given network // Dial connects to a particular peer, over a given network
// Example: Dial("udp", peer) // Example: Dial("udp", peer)

View File

@ -2,11 +2,13 @@ package swarm
import ( import (
"fmt" "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" "net"
"testing" "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) { func setupPeer(id string, addr string) (*peer.Peer, error) {