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-unixfs
Commits
c34d4df9
Commit
c34d4df9
authored
Sep 16, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(bitswap:network) define a service interface for use with net/service/Service
parent
503b1aa7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
bitswap/network/interface.go
bitswap/network/interface.go
+7
-0
No files found.
bitswap/network/interface.go
View file @
c34d4df9
...
@@ -19,3 +19,10 @@ type Receiver interface {
...
@@ -19,3 +19,10 @@ type Receiver interface {
ctx
context
.
Context
,
sender
*
peer
.
Peer
,
incoming
bsmsg
.
BitSwapMessage
)
(
ctx
context
.
Context
,
sender
*
peer
.
Peer
,
incoming
bsmsg
.
BitSwapMessage
)
(
outgoing
bsmsg
.
BitSwapMessage
,
destination
*
peer
.
Peer
,
err
error
)
outgoing
bsmsg
.
BitSwapMessage
,
destination
*
peer
.
Peer
,
err
error
)
}
}
// TODO(brian): move this to go-ipfs/net package
type
NetworkService
interface
{
SendRequest
(
ctx
context
.
Context
,
m
netmsg
.
NetMessage
)
(
netmsg
.
NetMessage
,
error
)
SendMessage
(
ctx
context
.
Context
,
m
netmsg
.
NetMessage
)
error
SetHandler
(
netservice
.
Handler
)
}
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