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-dms3
Commits
2edc03ac
Commit
2edc03ac
authored
Sep 14, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(bs:tx) rename network -> transmission
parent
806b3c29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
bitswap/bitswap.go
bitswap/bitswap.go
+3
-3
bitswap/receiver.go
bitswap/receiver.go
+3
-3
bitswap/transmission/interface.go
bitswap/transmission/interface.go
+0
-0
bitswap/transmission/service_wrapper.go
bitswap/transmission/service_wrapper.go
+0
-0
No files found.
bitswap/bitswap.go
View file @
2edc03ac
...
...
@@ -8,8 +8,8 @@ import (
ds
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go"
bsmsg
"github.com/jbenet/go-ipfs/bitswap/message"
bsnet
"github.com/jbenet/go-ipfs/bitswap/network"
notifications
"github.com/jbenet/go-ipfs/bitswap/notifications"
tx
"github.com/jbenet/go-ipfs/bitswap/transmission"
blocks
"github.com/jbenet/go-ipfs/blocks"
swarm
"github.com/jbenet/go-ipfs/net/swarm"
peer
"github.com/jbenet/go-ipfs/peer"
...
...
@@ -33,7 +33,7 @@ type BitSwap struct {
peer
*
peer
.
Peer
// net holds the connections to all peers.
sender
bsne
t
.
Sender
sender
t
x
.
Sender
net
swarm
.
Network
meschan
*
swarm
.
Chan
...
...
@@ -65,7 +65,7 @@ type BitSwap struct {
// NewBitSwap creates a new BitSwap instance. It does not check its parameters.
func
NewBitSwap
(
p
*
peer
.
Peer
,
net
swarm
.
Network
,
d
ds
.
Datastore
,
r
routing
.
IpfsRouting
)
*
BitSwap
{
receiver
:=
receiver
{}
sender
:=
bsne
t
.
NewBSNetService
(
context
.
Background
(),
&
receiver
)
sender
:=
t
x
.
NewBSNetService
(
context
.
Background
(),
&
receiver
)
bs
:=
&
BitSwap
{
peer
:
p
,
net
:
net
,
...
...
bitswap/receiver.go
View file @
2edc03ac
...
...
@@ -3,7 +3,7 @@ package bitswap
import
(
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
bsmsg
"github.com/jbenet/go-ipfs/bitswap/message"
bsne
t
"github.com/jbenet/go-ipfs/bitswap/
network
"
t
x
"github.com/jbenet/go-ipfs/bitswap/
transmission
"
peer
"github.com/jbenet/go-ipfs/peer"
)
...
...
@@ -12,7 +12,7 @@ import (
// as a constructor argument to BitSwap. However, the handler is BitSwap!
// Hence, this receiver.
type
receiver
struct
{
delegate
bsne
t
.
Receiver
delegate
t
x
.
Receiver
}
func
(
r
*
receiver
)
ReceiveMessage
(
...
...
@@ -24,6 +24,6 @@ func (r *receiver) ReceiveMessage(
return
r
.
delegate
.
ReceiveMessage
(
ctx
,
sender
,
incoming
)
}
func
(
r
*
receiver
)
Delegate
(
delegate
bsne
t
.
Receiver
)
{
func
(
r
*
receiver
)
Delegate
(
delegate
t
x
.
Receiver
)
{
r
.
delegate
=
delegate
}
bitswap/
network
/interface.go
→
bitswap/
transmission
/interface.go
View file @
2edc03ac
File moved
bitswap/
network
/service_wrapper.go
→
bitswap/
transmission
/service_wrapper.go
View file @
2edc03ac
File moved
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