Struct bitcoin::network::address::Address [−][src]
pub struct Address { pub services: ServiceFlags, pub address: [u16; 8], pub port: u16, }
A message which can be sent on the Bitcoin network
Fields
services: ServiceFlags
Services provided by the peer whose address this is
address: [u16; 8]
Network byte-order ipv6 address, or ipv4-mapped ipv6 address
port: u16
Network port
Implementations
impl Address
[src]
impl Address
[src]pub fn new(socket: &SocketAddr, services: ServiceFlags) -> Address
[src]
Create an address message for a socket
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
[src]
Extract socket address from an Address message. This will return io::Error io::ErrorKind::AddrNotAvailable if the message contains a Tor address.
Trait Implementations
impl ToSocketAddrs for Address
[src]
impl ToSocketAddrs for Address
[src]type Iter = Once<SocketAddr>
Returned iterator over socket addresses which this type may correspond to. Read more