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
45f9b5ae
Commit
45f9b5ae
authored
Jul 03, 2016
by
Jeromy
Browse files
expose backoff manager in swarm
parent
9ccbf103
Changes
1
Hide whitespace changes
Inline
Side-by-side
p2p/net/swarm/swarm.go
View file @
45f9b5ae
...
...
@@ -152,6 +152,7 @@ func (s *Swarm) AddAddrFilter(f string) error {
s
.
Filters
.
AddDialFilter
(
m
)
return
nil
}
func
filterAddrs
(
listenAddrs
[]
ma
.
Multiaddr
)
([]
ma
.
Multiaddr
,
error
)
{
if
len
(
listenAddrs
)
>
0
{
filtered
:=
addrutil
.
FilterUsableAddrs
(
listenAddrs
)
...
...
@@ -285,6 +286,10 @@ func (s *Swarm) LocalPeer() peer.ID {
return
s
.
local
}
func
(
s
*
Swarm
)
Backoff
()
*
dialbackoff
{
return
&
s
.
backf
}
// notifyAll sends a signal to all Notifiees
func
(
s
*
Swarm
)
notifyAll
(
notify
func
(
inet
.
Notifiee
))
{
s
.
notifmu
.
RLock
()
...
...
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