Class Ping


  • public class Ping
    extends Message

    Instances of this class are not safe for use by multiple threads.

    • Constructor Detail

      • Ping

        public Ping​(long nonce)
        Create a Ping with a nonce value. Only use this if the remote node has a protocol version greater than 60000
      • Ping

        public Ping()
        Create a Ping without a nonce value. Only use this if the remote node has a protocol version lower than or equal 60000
    • Method Detail

      • 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 class Message
        Throws:
        java.io.IOException
      • hasNonce

        public boolean hasNonce()
      • getNonce

        public long getNonce()