Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-swarm
Commits
4509f045
Commit
4509f045
authored
Jul 03, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose backoff manager in swarm
parent
74d19ef5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
swarm.go
swarm.go
+5
-0
No files found.
swarm.go
View file @
4509f045
...
...
@@ -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