Package org.bitcoinj.core
Class AddressV2Message
- java.lang.Object
-
- org.bitcoinj.core.Message
-
- org.bitcoinj.core.AddressMessage
-
- org.bitcoinj.core.AddressV2Message
-
public class AddressV2Message extends AddressMessage
Represents an "addrv2" 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 addrv2 messages is not presently implemented.
See BIP155 for details.
Instances of this class are not safe for use by multiple threads.
-
-
Field Summary
-
Fields inherited from class org.bitcoinj.core.AddressMessage
addresses, MAX_ADDRESSES
-
Fields inherited from class org.bitcoinj.core.Message
cursor, length, MAX_SIZE, offset, params, payload, recached, serializer, UNKNOWN_LENGTH
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAddress(PeerAddress address)
protected void
parse()
java.lang.String
toString()
-
Methods inherited from class org.bitcoinj.core.AddressMessage
bitcoinSerializeToStream, getAddresses, removeAddress
-
Methods inherited from class org.bitcoinj.core.Message
adjustLength, bitcoinSerialize, bitcoinSerialize, getHash, getMessageSize, getParams, hasMoreBytes, isCached, isRecached, readByte, readByteArray, readBytes, readHash, readInt64, readStr, readUint32, readUint64, readVarInt, readVarInt, setSerializer, unCache, unsafeBitcoinSerialize
-
-
-
-
Method Detail
-
parse
protected void parse() throws ProtocolException
- Specified by:
parse
in classMessage
- Throws:
ProtocolException
-
addAddress
public void addAddress(PeerAddress address)
- Specified by:
addAddress
in classAddressMessage
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-