public class AddressMessage extends Message
Represents an "addr" message on the P2P network, which contains broadcast IP addresses of other peers. This is one of the ways peers can find each other without using the DNS or IRC discovery mechanisms. However storing and using addr messages is not presently implemented.
Instances of this class are not safe for use by multiple threads.
cursor, length, MAX_SIZE, offset, params, payload, protocolVersion, recached, serializer, UNKNOWN_LENGTH
Modifier and Type | Method and Description |
---|---|
void |
addAddress(PeerAddress address) |
protected void |
bitcoinSerializeToStream(OutputStream stream)
Serializes this message to the provided stream.
|
List<PeerAddress> |
getAddresses() |
protected void |
parse() |
void |
removeAddress(int index) |
String |
toString() |
adjustLength, bitcoinSerialize, bitcoinSerialize, getHash, getMessageSize, getParams, hasMoreBytes, isCached, isRecached, readByteArray, readBytes, readHash, readInt64, readStr, readUint32, readUint64, readVarInt, readVarInt, unCache, unsafeBitcoinSerialize
protected void parse() throws ProtocolException
parse
in class Message
ProtocolException
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException
Message
bitcoinSerializeToStream
in class Message
IOException
public List<PeerAddress> getAddresses()
public void addAddress(PeerAddress address)
public void removeAddress(int index)
Copyright © 2016. All rights reserved.