Skip to content

Implemented experimental corenet application protocol support.#3518

Closed
tswindell wants to merge 1 commit intoipfs:masterfrom
tswindell:master
Closed

Implemented experimental corenet application protocol support.#3518
tswindell wants to merge 1 commit intoipfs:masterfrom
tswindell:master

Conversation

@tswindell
Copy link
Contributor

Signed-off-by: Tom Swindell t.swindell@rubyx.co.uk

@tswindell
Copy link
Contributor Author

This is a replacement for #3128

@tswindell tswindell force-pushed the master branch 3 times, most recently from a27d8a0 to b5f30ba Compare December 19, 2016 13:49
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
Copy link
Member

@Kubuxu Kubuxu Dec 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connect this and the next line with &&.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't do that, because nc -l blocks until disconnect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean line bellow that.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connect this and the next line with &&.

'

test_expect_success 'Test server to client communications' '
nc -l -p 10001 | dd of=server.out &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

@Kubuxu Kubuxu Dec 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use nc in other tests so this isn't required, but won't hurt I guess.

'

test_expect_success 'generate test data' '
dd if=/dev/urandom of=corenet0.bin bs=1K count=1 &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either use go-random or use some pre-set text data, easier to see on diff.

@tswindell tswindell force-pushed the master branch 2 times, most recently from ad7e375 to 9731cf1 Compare December 19, 2016 14:33
'

test_expect_success 'Test server to client communications' '
dd if=corenet0.bin | nc -l -p 10001 &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use just <, instead of dd.

'

test_expect_success 'Test server to client communications' '
nc -l -p 10001 | dd of=server.out &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same about dd.

pstore "gx/ipfs/QmeXj9VAjmYQZxpmVz7VzccbJrpmr8qkCDSjfVNsPTWTYU/go-libp2p-peerstore"
peer "gx/ipfs/QmfMmLGoKzCHDN7cGgk64PJr4iipzidDRME8HABSJqvmhC/go-libp2p-peer"

corenet "github.com/ipfs/go-ipfs/core/corenet"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License: MIT
Signed-off-by: Tom Swindell <t.swindell@rubyx.co.uk>
@ghost ghost added topic/libp2p Topic libp2p topic/commands Topic commands labels Jan 2, 2017
@whyrusleeping whyrusleeping added this to the Ipfs 0.4.8 milestone Mar 8, 2017
@whyrusleeping
Copy link
Member

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.

@whyrusleeping whyrusleeping modified the milestones: Ipfs 0.4.9, Ipfs 0.4.8 Mar 24, 2017
@whyrusleeping whyrusleeping modified the milestones: Ipfs 0.4.10, Ipfs 0.4.9 May 2, 2017
@MichaelMure
Copy link
Contributor

That would be very handy for my project. Currently I have to use pubsub, even for direct message between two nodes.

@whyrusleeping
Copy link
Member

@MichaelMure we're going to be working on getting this ready to ship soon. @magik6k is going to be pushing to get it merged :)

@MichaelMure
Copy link
Contributor

@magik6k, stranger of the internet, I'm rooting for you :-p

@Kubuxu
Copy link
Member

Kubuxu commented Jun 13, 2017

Implemented in #3943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic/commands Topic commands topic/libp2p Topic libp2p

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants