Class Ping


  • public class Ping
    extends Object
    A ping message to be sent or received from a peer
    • Method Detail

      • get_ponglen

        public short get_ponglen()
        The desired response length
      • set_ponglen

        public void set_ponglen​(short val)
        The desired response length
      • get_byteslen

        public short get_byteslen()
        The ping packet size. This field is not sent on the wire. byteslen zeros are sent.
      • set_byteslen

        public void set_byteslen​(short val)
        The ping packet size. This field is not sent on the wire. byteslen zeros are sent.
      • of

        public static Ping of​(short ponglen_arg,
                              short byteslen_arg)
        Constructs a new Ping given each field
      • clone

        public Ping clone()
        Creates a copy of the Ping
        Overrides:
        clone in class Object
      • write

        public byte[] write()
        Serialize the Ping object into a byte array which can be read by Ping_read
      • read

        public static Result_PingDecodeErrorZ read​(byte[] ser)
        Read a Ping from a byte array, created by Ping_write