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
aa3684f8
Commit
aa3684f8
authored
Sep 09, 2016
by
Jeromy Johnson
Committed by
GitHub
Sep 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3132 from ipfs/feat/versioned-protos
use correct protocol names for ipfs services
parents
540558d2
628442e8
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 @
aa3684f8
...
...
@@ -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 @
aa3684f8
...
...
@@ -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