[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / Pong.cs
index 2962c5453c24fbf5c3e8b35c858d0b0f238b9e27..ed704f8707461c7a78dd8e60b8323202c5c957d3 100644 (file)
@@ -7,7 +7,9 @@ namespace org { namespace ldk { namespace structs {
 
 
 /**
- * A pong message to be sent or received from a peer
+ * A [`pong`] message to be sent to or received from a peer.
+ * 
+ * [`pong`]: https://github.com/lightning/bolts/blob/master/01-messaging.md#the-ping-and-pong-messages
  */
 public class Pong : CommonBase {
        internal Pong(object _dummy, long ptr) : base(ptr) { }
@@ -17,6 +19,7 @@ public class Pong : CommonBase {
 
        /**
         * The pong packet size.
+        * 
         * This field is not sent on the wire. byteslen zeros are sent.
         */
        public short get_byteslen() {
@@ -27,6 +30,7 @@ public class Pong : CommonBase {
 
        /**
         * The pong packet size.
+        * 
         * This field is not sent on the wire. byteslen zeros are sent.
         */
        public void set_byteslen(short val) {
@@ -86,16 +90,18 @@ public class Pong : CommonBase {
         * Serialize the Pong object into a byte array which can be read by Pong_read
         */
        public byte[] write() {
-               byte[] ret = bindings.Pong_write(this.ptr);
+               long ret = bindings.Pong_write(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        /**
         * Read a Pong from a byte array, created by Pong_write
         */
        public static Result_PongDecodeErrorZ read(byte[] ser) {
-               long ret = bindings.Pong_read(ser);
+               long ret = bindings.Pong_read(InternalUtils.encodeUint8Array(ser));
                GC.KeepAlive(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);