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, recached, serializer, UNKNOWN_LENGTH| Modifier and Type | Method and Description |
|---|---|
void |
addAddress(PeerAddress address) |
protected void |
bitcoinSerializeToStream(java.io.OutputStream stream)
Serializes this message to the provided stream.
|
java.util.List<PeerAddress> |
getAddresses() |
protected void |
parse() |
void |
removeAddress(int index) |
java.lang.String |
toString() |
adjustLength, bitcoinSerialize, bitcoinSerialize, getHash, getMessageSize, getParams, hasMoreBytes, isCached, isRecached, readByte, readByteArray, readBytes, readHash, readInt64, readStr, readUint32, readUint64, readVarInt, readVarInt, setSerializer, unCache, unsafeBitcoinSerializeprotected void parse()
throws ProtocolException
parse in class MessageProtocolExceptionprotected void bitcoinSerializeToStream(java.io.OutputStream stream)
throws java.io.IOException
MessagebitcoinSerializeToStream in class Messagejava.io.IOExceptionpublic java.util.List<PeerAddress> getAddresses()
public void addAddress(PeerAddress address)
public void removeAddress(int index)
public java.lang.String toString()
toString in class java.lang.Object