Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ping #42

Merged
merged 1 commit into from
Nov 24, 2017
Merged

Implement ping #42

merged 1 commit into from
Nov 24, 2017

Conversation

tomaka
Copy link
Member

@tomaka tomaka commented Nov 22, 2017

Implements the ping protocol that is specific to IPFS.

One point that was discussed is the fact that ping() returns a tuple of both a pinger and a future that processes incoming messages.

The pinger can be used to send pings to the remote, while the future must be used to process pings and respond to pongs. Failing to use the future will just make the whole thing not work. This makes this crate a bit weird to use, but I don't think there is any better solution. Something has to respond to pings that are received by the local node.

@folsen
Copy link
Contributor

folsen commented Nov 23, 2017

LGTM!

@debris debris merged commit 2dafcdf into libp2p:master Nov 24, 2017
@tomaka tomaka deleted the ping branch November 24, 2017 11:08
@tomaka tomaka mentioned this pull request Nov 24, 2017
mxinden pushed a commit to mxinden/rust-libp2p that referenced this pull request Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants