protocols/: Add documentation on peer discovery (#2465)

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Frederik-Baetens
2022-02-09 15:54:07 +01:00
committed by GitHub
parent 0bb8ee98d5
commit 5a95a46cd3
3 changed files with 34 additions and 0 deletions

View File

@ -26,6 +26,13 @@
//! At least one identification request is sent on a newly established
//! connection, beyond which the behaviour does not keep connections alive.
//!
//! # Important Discrepancies
//!
//! - **Using Identify with other protocols** Unlike some other libp2p implementations,
//! rust-libp2p does not treat Identify as a core protocol. This means that other protocols cannot
//! rely upon the existence of Identify, and need to be manually hooked up to Identify in order to
//! make use of its capabilities.
//!
//! # Usage
//!
//! The [`Identify`] struct implements a `NetworkBehaviour` that negotiates