mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-23 06:41:34 +00:00
* Add a proper PeerId to Peerstore * Turn identify into a transport layer * Expose the dialed multiaddress * Add identified nodes to the peerstore * Allow configuring the TTL of the addresses * Split identify in two modules * Some comments and tweaks * Run rustfmt * Add test and bugfix * Fix wrong address reported when dialing * Fix websocket browser code * Support the p2p protocol in libp2p-identify * Fix concerns * Fix libp2p-dns * More concerns
rust-multiaddr
multiaddr implementation in Rust.
Table of Contents
Install
First add this to your Cargo.toml
[dependencies]
multiaddr = "*"
then run cargo build
.
Usage
extern crate multiaddr;
use multiaddr::{Multiaddr, ToMultiaddr};
let address = "/ip4/127.0.0.1/udp/1234".parse::<Multiaddr>().unwrap();
// or directly from a string
let other = "/ip4/127.0.0.1".to_multiaddr().unwrap();
assert_eq!(address.to_string(), "/ip4/127.0.0.1/udp/1234");
assert_eq!(other.to_string(), "/ip4/127.0.0.1");
Maintainers
Captain: @dignifiedquire.
Contribute
Contributions welcome. Please check out the issues.
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.
Small note: If editing the README, please conform to the standard-readme specification.
License
MIT © 2015-2017 Friedel Ziegelmeyer