Class Ping


  • public class Ping
    extends Message

    See BIP31 for details.

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

    • Constructor Detail

      • Ping

        public Ping​(long nonce)
        Create a Ping with a given nonce value.
      • Ping

        public Ping()
        Create a Ping with a random nonce value.
    • 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

        @Deprecated
        public boolean hasNonce()
        Deprecated.
        returns true
      • getNonce

        public long getNonce()