Can somebody point me to some link, tutorial, example code, etc... for a #p2p application? I roughly understand how do they work, but I would prefer to see some basic code because some parts are like magic for me. What I plan to build is similar to a torrent client, but I don't understand how clients search each other and how do they connect to each other.
If you can point to some Python or C/C++ code, that would be awesome.
@n0iroh at https://iroh.computer may be an interesting #p2p case study for you. #iroh is in turn used by @delta for instance.
You can read more on how #DeltaChat use iroh in their blog post at: https://delta.chat/en/2024-11-20-webxdc-realtime
Iroh's programming language used is #Rust though, but via the #WebAssembly support it may be usable in the languages you mention, but I am not sure.
There is also https://github.com/n0-computer/iroh-willow which is under construction and based on the #Willow protocol. This is also a foundational #p2p technology, which received funding by @nlnet under the EU Horizons #NGI0 programs, to evolve their specifications.
Willow contains among others a specification for support of object capabilities, called Meadowcap, which is very interesting.
https://willowprotocol.org/specs/meadowcap/index.html#meadowcap