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 * Constructs a new PeerHandleError given each field
23 public static PeerHandleError of() {
24 long ret = bindings.PeerHandleError_new();
25 if (ret >= 0 && ret <= 4096) { return null; }
26 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
27 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
31 internal long clone_ptr() {
32 long ret = bindings.PeerHandleError_clone_ptr(this.ptr);
38 * Creates a copy of the PeerHandleError
40 public PeerHandleError clone() {
41 long ret = bindings.PeerHandleError_clone(this.ptr);
43 if (ret >= 0 && ret <= 4096) { return null; }
44 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
45 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
50 * Get the string representation of a PeerHandleError object
52 public string to_str() {
53 long ret = bindings.PeerHandleError_to_str(this.ptr);
55 if (ret >= 0 && ret <= 4096) { return null; }
56 string ret_conv = InternalUtils.decodeString(ret);