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-core
Commits
a21b06e6
Commit
a21b06e6
authored
Feb 04, 2021
by
vyzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abstract Conn Stat interface for threading
parent
ac2ecf38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
network/conn.go
network/conn.go
+6
-3
No files found.
network/conn.go
View file @
a21b06e6
...
...
@@ -19,6 +19,7 @@ type Conn interface {
ConnSecurity
ConnMultiaddrs
ConnStat
// ID returns an identifier that uniquely identifies this Conn within this
// host, during this run. Connection IDs may repeat across restarts.
...
...
@@ -29,9 +30,6 @@ type Conn interface {
// GetStreams returns all open streams over this conn.
GetStreams
()
[]
Stream
// Stat stores metadata pertaining to this conn.
Stat
()
Stat
}
// ConnSecurity is the interface that one can mix into a connection interface to
...
...
@@ -61,3 +59,8 @@ type ConnMultiaddrs interface {
// with this connection
RemoteMultiaddr
()
ma
.
Multiaddr
}
type
ConnStat
interface
{
// Stat stores metadata pertaining to this conn.
Stat
()
Stat
}
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