Implemented experimental corenet application protocol support.#3518
Implemented experimental corenet application protocol support.#3518tswindell wants to merge 1 commit intoipfs:masterfrom
Conversation
|
This is a replacement for #3128 |
a27d8a0 to
b5f30ba
Compare
test/sharness/t0180-corenet.sh
Outdated
| test_expect_success 'Test server to client communications' ' | ||
| dd if=corenet0.bin | nc -l -p 10001 & | ||
|
|
||
| ipfsi 1 exp corenet dial $PEERID_0 corenet-test /ip4/127.0.0.1/tcp/10002 2>&1 > dialer-stdouterr.log |
There was a problem hiding this comment.
Connect this and the next line with &&.
There was a problem hiding this comment.
Can't do that, because nc -l blocks until disconnect.
test/sharness/t0180-corenet.sh
Outdated
| test_expect_success 'Test server to client communications' ' | ||
| nc -l -p 10001 | dd of=server.out & | ||
|
|
||
| ipfsi 1 exp corenet dial $PEERID_0 corenet-test /ip4/127.0.0.1/tcp/10002 2>&1 > dialer-stdouterr.log |
There was a problem hiding this comment.
Connect this and the next line with &&.
test/sharness/t0180-corenet.sh
Outdated
| ' | ||
|
|
||
| test_expect_success 'Test server to client communications' ' | ||
| nc -l -p 10001 | dd of=server.out & |
There was a problem hiding this comment.
Always collect PID of background jobs to: 1. check their return code, 2. try killing them when tests are done.
|
|
||
| # netcat (nc) is needed for the following tests | ||
| test_expect_success "nc is available" ' | ||
| type nc >/dev/null |
There was a problem hiding this comment.
We use nc in other tests so this isn't required, but won't hurt I guess.
test/sharness/t0180-corenet.sh
Outdated
| ' | ||
|
|
||
| test_expect_success 'generate test data' ' | ||
| dd if=/dev/urandom of=corenet0.bin bs=1K count=1 && |
There was a problem hiding this comment.
Either use go-random or use some pre-set text data, easier to see on diff.
ad7e375 to
9731cf1
Compare
test/sharness/t0180-corenet.sh
Outdated
| ' | ||
|
|
||
| test_expect_success 'Test server to client communications' ' | ||
| dd if=corenet0.bin | nc -l -p 10001 & |
There was a problem hiding this comment.
You can use just <, instead of dd.
test/sharness/t0180-corenet.sh
Outdated
| ' | ||
|
|
||
| test_expect_success 'Test server to client communications' ' | ||
| nc -l -p 10001 | dd of=server.out & |
core/commands/corenet.go
Outdated
| pstore "gx/ipfs/QmeXj9VAjmYQZxpmVz7VzccbJrpmr8qkCDSjfVNsPTWTYU/go-libp2p-peerstore" | ||
| peer "gx/ipfs/QmfMmLGoKzCHDN7cGgk64PJr4iipzidDRME8HABSJqvmhC/go-libp2p-peer" | ||
|
|
||
| corenet "github.com/ipfs/go-ipfs/core/corenet" |
There was a problem hiding this comment.
License: MIT Signed-off-by: Tom Swindell <t.swindell@rubyx.co.uk>
|
I'm planning on reviewing and getting this ready to go hopefully for the 0.4.8 release. Since we're clear about the experimental nature of it i think that its fine to merge it without perfecting the interfaces. |
|
That would be very handy for my project. Currently I have to use pubsub, even for direct message between two nodes. |
|
@MichaelMure we're going to be working on getting this ready to ship soon. @magik6k is going to be pushing to get it merged :) |
|
@magik6k, stranger of the internet, I'm rooting for you :-p |
|
Implemented in #3943 |
Signed-off-by: Tom Swindell t.swindell@rubyx.co.uk