1
0
mirror of https://github.com/fluencelabs/rust-libp2p synced 2025-07-28 15:31:57 +00:00

docs(examples): add a README to each example

Resolves .

Pull-Request: .
This commit is contained in:
Thomas Coratger
2023-06-01 09:40:22 +02:00
committed by GitHub
parent 87e863e8c9
commit 75edcfcdb0
26 changed files with 501 additions and 223 deletions
examples
autonat
chat-example
dcutr
distributed-key-value-store
file-sharing
identify
ipfs-kad
ipfs-private
metrics
ping-example
relay-server
rendezvous

@@ -18,23 +18,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//! identify example
//!
//! In the first terminal window, run:
//!
//! ```sh
//! cargo run
//! ```
//! It will print the [`PeerId`] and the listening addresses, e.g. `Listening on
//! "/ip4/127.0.0.1/tcp/24915"`
//!
//! In the second terminal window, start a new instance of the example with:
//!
//! ```sh
//! cargo run -- /ip4/127.0.0.1/tcp/24915
//! ```
//! The two nodes establish a connection, negotiate the identify protocol
//! and will send each other identify info which is then printed to the console.
#![doc = include_str!("../README.md")]
use futures::prelude::*;
use libp2p::{