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

protocols/rendezvous: Improve examples #2229

Merged
merged 3 commits into from
Sep 25, 2021

Conversation

wngr
Copy link
Contributor

@wngr wngr commented Sep 11, 2021

  • Add support for the Identify protocol to the server, such that the
    register_with_identify example works as intended
  • Add discovery loop to the discovery example and demonstrate cookie
    usage

* Add support for the `Identify` protocol to the server, such that the
  `register_with_identify` example works as intended
* Add discovery loop to the `discovery` example and demonstrate cookie
  usage
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

LGTM!

protocols/rendezvous/examples/discover.rs Show resolved Hide resolved
@dvc94ch
Copy link
Contributor

dvc94ch commented Sep 16, 2021

is mxinden still the only one with write access to the repo? maybe it's time to add @thomaseizinger

@thomaseizinger
Copy link
Contributor

is mxinden still the only one with write access to the repo? maybe it's time to add @thomaseizinger

Thanks for the nomination! There is an ongoing discussion about becoming a maintainer, should be sorted once @mxinden comes back from vacation!


loop {
tokio::select! {
Copy link
Contributor

Choose a reason for hiding this comment

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

futures::select would be more generic, presumably this is just a reexport

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not, the implementation is in fact very different: tokio-rs/tokio@8cf98d6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in my toolbox right now. Didn't bother trying to be runtime agnostic, as the example already used stuff from tokio.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thanks @wngr!

@mxinden mxinden merged commit 3034901 into libp2p:master Sep 25, 2021
@wngr wngr deleted the ow/rendezvous-examples branch September 26, 2021 17:04
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.

4 participants