1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
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 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class PeerHandleError extends CommonBase {
16 PeerHandleError(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.PeerHandleError_free(ptr); }
24 * Used to indicate that we probably can't make any future connections to this peer, implying
25 * we should go ahead and force-close any channels we have with it.
27 public boolean get_no_connection_possible() {
28 boolean ret = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
33 * Used to indicate that we probably can't make any future connections to this peer, implying
34 * we should go ahead and force-close any channels we have with it.
36 public void set_no_connection_possible(boolean val) {
37 bindings.PeerHandleError_set_no_connection_possible(this.ptr, val);
41 * Constructs a new PeerHandleError given each field
43 public static PeerHandleError constructor_new(boolean no_connection_possible_arg) {
44 long ret = bindings.PeerHandleError_new(no_connection_possible_arg);
45 PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
46 ret_hu_conv.ptrs_to.add(ret_hu_conv);
51 * Creates a copy of the PeerHandleError
53 public PeerHandleError clone() {
54 long ret = bindings.PeerHandleError_clone(this.ptr);
55 PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
56 ret_hu_conv.ptrs_to.add(this);