Coder Social home page Coder Social logo

Comments (3)

macsnoeren avatar macsnoeren commented on August 17, 2024

Within Blockchain you form a network between the nodes. When nodeA and nodeB are connected somehow (inbound or outbound), they already have a connection together within this network. This connection is bi-directional. Both nodes are able to start communication with each other. So, there is no need to make on TCP/IP level two connections. Another aspect is, when allowing two TCP/IP connections between the same nodes, it makes things more complex than needed. Thus, for the blockchain network you just need a connection between the two. How this has been established is not relevant.

from python-p2p-network.

macsnoeren avatar macsnoeren commented on August 17, 2024

Now your question "If in the previous setup a nodeB calls send_to_nodes, will it reach nodeA?". In this case ... no ... but you can implement this. It is application specific. This Python library tends to be a framework in which you can implement peer-to-peer decentralized applications. In your example, you can implement that nodeB relays the message to nodeA. In fact, within peer-to-peer decentralized application, this is very common to have. For example, you could send a discovery message in order to see how big the network is. If a node gets this discovery message, it should relay it further into the network. To prevent circulation of messages like these, you need to do some administration.

from python-p2p-network.

macsnoeren avatar macsnoeren commented on August 17, 2024

I assume your question has been answered ;).

from python-p2p-network.

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.