Change some nat_traversals to consider a prefix. (#550)

Change some `nat_traversal`s to consider a prefix.

Transports should consider only the relevant address prefix.
This commit is contained in:
Toralf Wittner
2018-10-15 16:29:32 +02:00
committed by GitHub
parent e179951c74
commit 2c98d06942
5 changed files with 49 additions and 87 deletions

View File

@ -120,6 +120,11 @@ impl fmt::Display for Multiaddr {
}
impl Multiaddr {
/// Create a new, empty multiaddress.
pub fn empty() -> Multiaddr {
Multiaddr { bytes: Vec::new() }
}
/// Returns the raw bytes representation of the multiaddr.
#[inline]
pub fn into_bytes(self) -> Vec<u8> {