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
dms3
go-dms3
Commits
a8330f1f
Commit
a8330f1f
authored
Oct 13, 2014
by
Jeromy
Committed by
Juan Batiz-Benet
Oct 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add methods on net interface to retrieve bandwidth values
parent
afe85ce1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
net/interface.go
net/interface.go
+4
-0
net/net.go
net/net.go
+4
-0
No files found.
net/interface.go
View file @
a8330f1f
...
...
@@ -29,6 +29,10 @@ type Network interface {
// GetPeerList returns the list of peers currently connected in this network.
GetPeerList
()
[]
*
peer
.
Peer
// GetBandwidthTotals returns the total number of bytes passed through
// the network since it was instantiated
GetBandwidthTotals
()
(
uint64
,
uint64
)
// SendMessage sends given Message out
SendMessage
(
msg
.
NetMessage
)
error
...
...
net/net.go
View file @
a8330f1f
...
...
@@ -111,3 +111,7 @@ func (n *IpfsNetwork) Close() error {
func
(
n
*
IpfsNetwork
)
GetPeerList
()
[]
*
peer
.
Peer
{
return
n
.
swarm
.
GetPeerList
()
}
func
(
n
*
IpfsNetwork
)
GetBandwidthTotals
()
(
in
uint64
,
out
uint64
)
{
return
n
.
muxer
.
GetBandwidthTotals
()
}
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