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
43dfa5fa
Commit
43dfa5fa
authored
May 08, 2020
by
Aarsh Shah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check if peer supports a protocol without allocation
parent
a4b837bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
peerstore/peerstore.go
peerstore/peerstore.go
+7
-0
No files found.
peerstore/peerstore.go
View file @
43dfa5fa
...
...
@@ -233,5 +233,12 @@ type ProtoBook interface {
AddProtocols
(
peer
.
ID
,
...
string
)
error
SetProtocols
(
peer
.
ID
,
...
string
)
error
RemoveProtocols
(
peer
.
ID
,
...
string
)
error
// SupportsProtocols returns the set of protocols the peer supports from among the given protocols.
// If the returned error is not nil, the result is indeterminate.
SupportsProtocols
(
peer
.
ID
,
...
string
)
([]
string
,
error
)
// IsProtocolSupported returns true if the peer supports the given protocol and false otherwise.
// If the returned error is not nil, the result is indeterminate.
IsProtocolSupported
(
peer
.
ID
,
string
)
(
bool
,
error
)
}
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