Package org.bitcoinj.core
Class Pong
- java.lang.Object
-
- org.bitcoinj.core.Message
-
- org.bitcoinj.core.Pong
-
-
Field Summary
-
Fields inherited from class org.bitcoinj.core.Message
MAX_SIZE, params, payload, serializer
-
-
Constructor Summary
Constructors Constructor Description Pong(long nonce)
Create a Pong with a nonce value.Pong(NetworkParameters params, java.nio.ByteBuffer payload)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bitcoinSerializeToStream(java.io.OutputStream stream)
Serializes this message to the provided stream.long
getNonce()
Returns the nonce sent by the remote peer.protected void
parse()
-
Methods inherited from class org.bitcoinj.core.Message
bitcoinSerialize, getHash, getMessageSize, getParams, readByte, readByteArray, readBytes, readHash, readInt32, readInt64, readStr, readUint32, readUint64, readVarInt, skipBytes, unCache, unsafeBitcoinSerialize
-
-
-
-
Constructor Detail
-
Pong
public Pong(NetworkParameters params, java.nio.ByteBuffer payload) 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 greater than 60000
-
-
Method Detail
-
parse
protected void parse() throws java.nio.BufferUnderflowException, ProtocolException
- Specified by:
parse
in classMessage
- Throws:
java.nio.BufferUnderflowException
ProtocolException
-
bitcoinSerializeToStream
public void bitcoinSerializeToStream(java.io.OutputStream stream) throws java.io.IOException
Description copied from class:Message
Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().- Overrides:
bitcoinSerializeToStream
in classMessage
- Throws:
java.io.IOException
-
getNonce
public long getNonce()
Returns the nonce sent by the remote peer.
-
-