Package org.ldk.structs
Class Ping
- java.lang.Object
-
- org.ldk.structs.Ping
-
public class Ping extends Object
A [`ping`] message to be sent to or received from a peer. [`ping`]: https://github.com/lightning/bolts/blob/master/01-messaging.md#the-ping-and-pong-messages
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Ping
clone()
Creates a copy of the Pingboolean
eq(Ping b)
Checks if two Pings contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
short
get_byteslen()
The ping packet size.short
get_ponglen()
The desired response length.static Ping
of(short ponglen_arg, short byteslen_arg)
Constructs a new Ping given each fieldstatic Result_PingDecodeErrorZ
read(byte[] ser)
Read a Ping from a byte array, created by Ping_writevoid
set_byteslen(short val)
The ping packet size.void
set_ponglen(short val)
The desired response length.byte[]
write()
Serialize the Ping object into a byte array which can be read by Ping_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
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
-
eq
public boolean eq(Ping b)
Checks if two Pings contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
-
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
-
-