+ bindings.MessageHandler_set_onion_message_handler(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ if (this != null) { this.ptrs_to.AddLast(val); };
+ }
+
+ /**
+ * A message handler which handles custom messages. The only LDK-provided implementation is
+ * [`IgnoringMessageHandler`].
+ */
+ public CustomMessageHandler get_custom_message_handler() {
+ long ret = bindings.MessageHandler_get_custom_message_handler(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ CustomMessageHandler ret_hu_conv = new CustomMessageHandler(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * A message handler which handles custom messages. The only LDK-provided implementation is
+ * [`IgnoringMessageHandler`].
+ */
+ public void set_custom_message_handler(org.ldk.structs.CustomMessageHandler val) {
+ bindings.MessageHandler_set_custom_message_handler(this.ptr, val.ptr);