6 namespace org { namespace ldk { namespace structs {
10 * Error for PeerManager errors. If you get one of these, you must disconnect the socket and
11 * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the
14 public class PeerHandleError : CommonBase {
15 internal PeerHandleError(object _dummy, long ptr) : base(ptr) { }
17 if (ptr != 0) { bindings.PeerHandleError_free(ptr); }
21 * Used to indicate that we probably can't make any future connections to this peer (e.g.
22 * because we required features that our peer was missing, or vice versa).
24 * While LDK's [`ChannelManager`] will not do it automatically, you likely wish to force-close
25 * any channels with this peer or check for new versions of LDK.
27 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
29 public bool get_no_connection_possible() {
30 bool ret = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
36 * Used to indicate that we probably can't make any future connections to this peer (e.g.
37 * because we required features that our peer was missing, or vice versa).
39 * While LDK's [`ChannelManager`] will not do it automatically, you likely wish to force-close
40 * any channels with this peer or check for new versions of LDK.
42 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
44 public void set_no_connection_possible(bool val) {
45 bindings.PeerHandleError_set_no_connection_possible(this.ptr, val);
51 * Constructs a new PeerHandleError given each field
53 public static PeerHandleError of(bool no_connection_possible_arg) {
54 long ret = bindings.PeerHandleError_new(no_connection_possible_arg);
55 GC.KeepAlive(no_connection_possible_arg);
56 if (ret >= 0 && ret <= 4096) { return null; }
57 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
58 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
62 internal long clone_ptr() {
63 long ret = bindings.PeerHandleError_clone_ptr(this.ptr);
69 * Creates a copy of the PeerHandleError
71 public PeerHandleError clone() {
72 long ret = bindings.PeerHandleError_clone(this.ptr);
74 if (ret >= 0 && ret <= 4096) { return null; }
75 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
76 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };