Question: How do i go about receiving a message from the net? (how does bitswap do this now?)
BitSwap and DHT register Handlers. BitSwap's handler implementation is here:
https://github.com/jbenet/go-ipfs/blob/net-dht-stash/bitswap/transmission/service_wrapper.go#L29
@jbenet just made some interface improvements so the way this gets wired up will be better.
The procedure is as follows:
Note that the handler can be DHT or Bitswap sessions or some helper object. In the snippets above, the DHT session is used.
In bitswap, presently a helper is used. I'm going to change Bitswap to behave the way the DHT does!
Adding to the above, the dht still gets network because it may have to connect to (network.Dial) new peers
bitswap now uses the new net layer. increasing granularity. specific remaining tasks are tracked in
#97 #96 #95
@perfmode thanks for linking things here! super helpful to reading :) ๐
Merge pull request #65 from ipfs/frrist/remove-deprecated
Merge pull request ipfs#65 from libp2p/feat/pubkey-extract
Merge pull request ipfs#65 from ipfs/dependabot/go_modules/github.comโฆ
go-ipfs-config: Merge pull request ipfs#65 from ipfs/dependabot/go_moโฆ
Activity
whyrusleeping commentedon Sep 16, 2014
Question: How do i go about receiving a message from the net? (how does bitswap do this now?)
btc commentedon Sep 16, 2014
BitSwap and DHT register Handlers. BitSwap's handler implementation is here:
https://github.com/jbenet/go-ipfs/blob/net-dht-stash/bitswap/transmission/service_wrapper.go#L29
@jbenet just made some interface improvements so the way this gets wired up will be better.
The procedure is as follows:
Note that the handler can be DHT or Bitswap sessions or some helper object. In the snippets above, the DHT session is used.
In bitswap, presently a helper is used. I'm going to change Bitswap to behave the way the DHT does!
jbenet commentedon Sep 16, 2014
Adding to the above, the dht still gets network because it may have to connect to (network.Dial) new peers
btc commentedon Sep 22, 2014
bitswap now uses the new net layer. increasing granularity. specific remaining tasks are tracked in
#97
#96
#95
jbenet commentedon Sep 22, 2014
@perfmode thanks for linking things here! super helpful to reading :) ๐
Merge pull request #65 from ipfs/frrist/remove-deprecated
Merge pull request ipfs#65 from libp2p/feat/pubkey-extract
Merge pull request ipfs#65 from ipfs/dependabot/go_modules/github.comโฆ
go-ipfs-config: Merge pull request ipfs#65 from ipfs/dependabot/go_moโฆ