Commit 7d201894 authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub
Browse files

Merge pull request #141 from libp2p/feat/get-streams

update packages to add support for getStreams
parents 7506bac7 1bad77c7
...@@ -118,6 +118,14 @@ func (c *conn) NewStream() (inet.Stream, error) { ...@@ -118,6 +118,14 @@ func (c *conn) NewStream() (inet.Stream, error) {
return s, nil return s, nil
} }
func (c *conn) GetStreams() ([]inet.Stream, error) {
var out []inet.Stream
for e := c.streams.Front(); e != nil; e = e.Next() {
out = append(out, e.Value.(*stream))
}
return out, nil
}
// LocalMultiaddr is the Multiaddr on this side // LocalMultiaddr is the Multiaddr on this side
func (c *conn) LocalMultiaddr() ma.Multiaddr { func (c *conn) LocalMultiaddr() ma.Multiaddr {
return c.localAddr return c.localAddr
......
...@@ -10,12 +10,12 @@ import ( ...@@ -10,12 +10,12 @@ import (
u "github.com/ipfs/go-ipfs-util" u "github.com/ipfs/go-ipfs-util"
logging "github.com/ipfs/go-log" logging "github.com/ipfs/go-log"
ps "github.com/jbenet/go-peerstream"
host "github.com/libp2p/go-libp2p-host" host "github.com/libp2p/go-libp2p-host"
inet "github.com/libp2p/go-libp2p-net" inet "github.com/libp2p/go-libp2p-net"
protocol "github.com/libp2p/go-libp2p-protocol" protocol "github.com/libp2p/go-libp2p-protocol"
swarm "github.com/libp2p/go-libp2p-swarm" swarm "github.com/libp2p/go-libp2p-swarm"
testutil "github.com/libp2p/go-libp2p/p2p/test/util" testutil "github.com/libp2p/go-libp2p/p2p/test/util"
ps "github.com/libp2p/go-peerstream"
) )
func init() { func init() {
......
...@@ -114,9 +114,9 @@ ...@@ -114,9 +114,9 @@
"version": "0.0.0" "version": "0.0.0"
}, },
{ {
"hash": "QmRmFKJgjjQhrT1uDyhpS87kE5M9YbMT8RBWam5uk8o4uH", "hash": "QmS9en3mcwW2HRSeRabceJEGVxTZF4vEeFm7JHWQwWsb1U",
"name": "go-peerstream", "name": "go-peerstream",
"version": "1.1.0" "version": "1.4.1"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
...@@ -210,39 +210,39 @@ ...@@ -210,39 +210,39 @@
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmdiBXu57LDzaoovc89jypRSNEhxVZ4zRig2AsXm9VwrsS", "hash": "QmU1YMnktAuCPBC7TqhbZRkpZ7KCiekv7SZtaLU5zpTgqb",
"name": "go-libp2p-conn", "name": "go-libp2p-conn",
"version": "1.2.1" "version": "1.4.0"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmdXimY9QHaasZmw6hWojWnCJvfgxETjZQfg9g6ZrA9wMX", "hash": "QmdysBu77i3YaagNtMAjiCJdeWWvds18ho5XEB784guQ41",
"name": "go-libp2p-net", "name": "go-libp2p-net",
"version": "1.2.1" "version": "1.5.0"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmWpTXhTkpoCDEm9twJd5Rc9jFwy61emzxneeJzrVMfjGF", "hash": "QmVcNzHewFvmVah1CGqg8NV7nHHsPu19U43YE5b2oqWyBp",
"name": "go-libp2p-metrics", "name": "go-libp2p-metrics",
"version": "1.2.0" "version": "1.5.0"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmNxScD426NivSWRNJdLVfXLrzVdtNWxW74EnXAWJvgGwh", "hash": "QmctX4TY6jXtpfeDiwMGoB4qVTBGDnz7T7r22CwQSzTgwt",
"name": "go-libp2p-interface-conn", "name": "go-libp2p-interface-conn",
"version": "0.1.2" "version": "0.4.0"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmdML3R42PRSwnt46jSuEts9bHSqLctVYEjJqMR3UYV8ki", "hash": "QmWf338UyG5DKyemvoFiomDPtkVNHLsw3GAt9XXHX5ZtsM",
"name": "go-libp2p-host", "name": "go-libp2p-host",
"version": "1.1.0" "version": "1.1.1"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmTsTADtVpWhp2CYpAqDJWYSK94gMzhE77mQKbp18oC4PK", "hash": "QmYe8b7yWBaaE4bxoG9UB1pvSYkcXnNAMP664iJfnvH4i5",
"name": "go-libp2p-swarm", "name": "go-libp2p-swarm",
"version": "1.2.0" "version": "1.3.2"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment