Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
7d201894
Commit
7d201894
authored
Nov 03, 2016
by
Jeromy Johnson
Committed by
GitHub
Nov 03, 2016
Browse files
Merge pull request #141 from libp2p/feat/get-streams
update packages to add support for getStreams
parents
7506bac7
1bad77c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
p2p/net/mock/mock_conn.go
View file @
7d201894
...
@@ -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
...
...
p2p/test/reconnects/reconnect_test.go
View file @
7d201894
...
@@ -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
()
{
...
...
package.json
View file @
7d201894
...
@@ -114,9 +114,9 @@
...
@@ -114,9 +114,9 @@
"version"
:
"0.0.0"
"version"
:
"0.0.0"
},
},
{
{
"hash"
:
"Qm
RmFKJgjjQhrT1uDyhpS87kE5M9YbMT8RBWam5uk8o4uH
"
,
"hash"
:
"Qm
S9en3mcwW2HRSeRabceJEGVxTZF4vEeFm7JHWQwWsb1U
"
,
"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"
:
"Qm
diBXu57LDzaoovc89jypRSNEhxVZ4zRig2AsXm9VwrsS
"
,
"hash"
:
"Qm
U1YMnktAuCPBC7TqhbZRkpZ7KCiekv7SZtaLU5zpTgqb
"
,
"name"
:
"go-libp2p-conn"
,
"name"
:
"go-libp2p-conn"
,
"version"
:
"1.
2.1
"
"version"
:
"1.
4.0
"
},
},
{
{
"author"
:
"whyrusleeping"
,
"author"
:
"whyrusleeping"
,
"hash"
:
"Qmd
XimY9QHaasZmw6hWojWnCJvfgxETjZQfg9g6ZrA9wMX
"
,
"hash"
:
"Qmd
ysBu77i3YaagNtMAjiCJdeWWvds18ho5XEB784guQ41
"
,
"name"
:
"go-libp2p-net"
,
"name"
:
"go-libp2p-net"
,
"version"
:
"1.
2.1
"
"version"
:
"1.
5.0
"
},
},
{
{
"author"
:
"whyrusleeping"
,
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
WpTXhTkpoCDEm9twJd5Rc9jFwy61emzxneeJzrVMfjGF
"
,
"hash"
:
"Qm
VcNzHewFvmVah1CGqg8NV7nHHsPu19U43YE5b2oqWyBp
"
,
"name"
:
"go-libp2p-metrics"
,
"name"
:
"go-libp2p-metrics"
,
"version"
:
"1.
2
.0"
"version"
:
"1.
5
.0"
},
},
{
{
"author"
:
"whyrusleeping"
,
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
NxScD426NivSWRNJdLVfXLrzVdtNWxW74EnXAWJvgGwh
"
,
"hash"
:
"Qm
ctX4TY6jXtpfeDiwMGoB4qVTBGDnz7T7r22CwQSzTgwt
"
,
"name"
:
"go-libp2p-interface-conn"
,
"name"
:
"go-libp2p-interface-conn"
,
"version"
:
"0.
1.2
"
"version"
:
"0.
4.0
"
},
},
{
{
"author"
:
"whyrusleeping"
,
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
dML3R42PRSwnt46jSuEts9bHSqLctVYEjJqMR3UYV8ki
"
,
"hash"
:
"Qm
Wf338UyG5DKyemvoFiomDPtkVNHLsw3GAt9XXHX5ZtsM
"
,
"name"
:
"go-libp2p-host"
,
"name"
:
"go-libp2p-host"
,
"version"
:
"1.1.
0
"
"version"
:
"1.1.
1
"
},
},
{
{
"author"
:
"whyrusleeping"
,
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
TsTADtVpWhp2CYpAqDJWYSK94gMzhE77mQKbp18oC4PK
"
,
"hash"
:
"Qm
Ye8b7yWBaaE4bxoG9UB1pvSYkcXnNAMP664iJfnvH4i5
"
,
"name"
:
"go-libp2p-swarm"
,
"name"
:
"go-libp2p-swarm"
,
"version"
:
"1.
2.0
"
"version"
:
"1.
3.2
"
},
},
{
{
"author"
:
"whyrusleeping"
,
"author"
:
"whyrusleeping"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment