Git Product home page Git Product logo

Comments (7)

vyzo avatar vyzo commented on July 24, 2024

I am not too excited about that.

from go-libp2p-daemon.

cheatfate avatar cheatfate commented on July 24, 2024

PeerInfo is used in LIST_PEERS and in DHT requests.

Sorry but i can't see any use-cases for LIST_PEERS, but i see how it can be used in DHT. But i think its not possible in current version of DHT to obtain list of protocols supported by peer, or i'm wrong? @vyzo

from go-libp2p-daemon.

jacobheun avatar jacobheun commented on July 24, 2024

The protocols are discovered and added to the Peer Store during Identify, there's just currently no trivial way for us to get those known protocols from the Daemon. Right now the only access we have to the Peer Store is LIST_PEERS. I'd like to be able to get this information from the Daemon about a given peer.

I am not too excited about that.

@vyzo is it the usage in LIST_PEERS, or exposing the protocols period?

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

You can use identify directly on a peer.

from go-libp2p-daemon.

jacobheun avatar jacobheun commented on July 24, 2024

Unless I am missing something, the only way to currently use identify directly on a peer would be to implement the identify protocol in a daemon client and perform that on a connected peer.

IDENTIFY currently only applies to the daemon itself.

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

It's trivial, you just open a stream and read the identify response.

Having said that, we probably want to expose the Peerstore where such information can be obtained.
I don't want to extend the PeerInfo struct though, it's a kludge.

from go-libp2p-daemon.

jacobheun avatar jacobheun commented on July 24, 2024

Exposing the Peerstore would be ideal.

I can create a PR for the proto and Spec additions.

from go-libp2p-daemon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.