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:

committed by
Brian Tiger Chow

parent
5c79fc48e2
commit
c59125b64c
@ -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)
|
@ -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) {
|
Reference in New Issue
Block a user