com.google.bitcoin.core
Class Pong
java.lang.Object
com.google.bitcoin.core.Message
com.google.bitcoin.core.Pong
- All Implemented Interfaces:
- Serializable
public class Pong
- extends Message
- See Also:
- Serialized Form
|
Field Summary |
static int |
MIN_PROTOCOL_VERSION
The smallest protocol version that supports the pong response (BIP 31). |
| Fields inherited from class com.google.bitcoin.core.Message |
bytes, checksum, cursor, length, MAX_SIZE, offset, params, parsed, parseLazy, parseRetain, protocolVersion, recached, UNKNOWN_LENGTH |
| Methods inherited from class com.google.bitcoin.core.Message |
adjustLength, bitcoinSerialize, bitcoinSerialize, ensureParsed, getHash, getMessageSize, getParams, isCached, isParsed, isRecached, maybeParse, unCache, unsafeBitcoinSerialize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_PROTOCOL_VERSION
public static final int MIN_PROTOCOL_VERSION
- The smallest protocol version that supports the pong response (BIP 31). Anything beyond version 60000.
- See Also:
- Constant Field Values
Pong
public Pong(NetworkParameters params,
byte[] payloadBytes)
throws ProtocolException
- Throws:
ProtocolException
Pong
public Pong(long nonce)
- Create a Pong with a nonce value.
Only use this if the remote node has a protocol version > 60000
bitcoinSerializeToStream
public void bitcoinSerializeToStream(OutputStream stream)
throws IOException
- Description copied from class:
Message
- Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
- Throws:
IOException
parseLite
protected void parseLite()
- Description copied from class:
Message
- Perform the most minimal parse possible to calculate the length of the message.
This is only required for subclasses of ChildClass as root level messages will have their length passed
into the constructor.
Implementations should adhere to the following contract: If parseLazy = true the 'length'
field must be set before returning. If parseLazy = false the length field must be set either
within the parseLite() method OR the parse() method. The overriding requirement is that length
must be set to non UNKNOWN_MESSAGE value by the time the constructor exits.
- Specified by:
parseLite in class Message
Copyright © 2014. All rights reserved.