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-bitswap
Commits
628442e8
Commit
628442e8
authored
Aug 26, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use correct protocol names for ipfs services
License: MIT Signed-off-by:
Jeromy
<
why@ipfs.io
>
parent
f3ea01e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
network/interface.go
network/interface.go
+2
-1
network/ipfs_impl.go
network/ipfs_impl.go
+2
-2
No files found.
network/interface.go
View file @
628442e8
...
...
@@ -8,7 +8,8 @@ import (
protocol
"gx/ipfs/Qmf4ETeAWXuThBfWwonVyFqGFSgTWepUDEr1txcctvpTXS/go-libp2p/p2p/protocol"
)
var
ProtocolBitswap
protocol
.
ID
=
"/ipfs/bitswap"
var
ProtocolBitswap
protocol
.
ID
=
"/ipfs/bitswap/1.0.0"
var
ProtocolBitswapOld
protocol
.
ID
=
"/ipfs/bitswap"
// BitSwapNetwork provides network connectivity for BitSwap sessions
type
BitSwapNetwork
interface
{
...
...
network/ipfs_impl.go
View file @
628442e8
...
...
@@ -26,7 +26,7 @@ func NewFromIpfsHost(host host.Host, r routing.ContentRouting) BitSwapNetwork {
routing
:
r
,
}
host
.
SetStreamHandler
(
ProtocolBitswap
,
bitswapNetwork
.
handleNewStream
)
host
.
SetStreamHandler
(
"/bitswap/1.0.0"
,
bitswapNetwork
.
handleNewStream
)
host
.
SetStreamHandler
(
ProtocolBitswapOld
,
bitswapNetwork
.
handleNewStream
)
host
.
Network
()
.
Notify
((
*
netNotifiee
)(
&
bitswapNetwork
))
// TODO: StopNotify.
...
...
@@ -73,7 +73,7 @@ func (bsnet *impl) newStreamToPeer(ctx context.Context, p peer.ID) (inet.Stream,
return
nil
,
err
}
return
bsnet
.
host
.
NewStream
(
ctx
,
p
,
"/bitswap/1.0.0"
,
ProtocolBitswap
)
return
bsnet
.
host
.
NewStream
(
ctx
,
p
,
ProtocolBitswap
,
ProtocolBitswap
Old
)
}
func
(
bsnet
*
impl
)
SendMessage
(
...
...
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