import * as bindings from '../bindings.mjs'
+/**
+ * Error for PeerManager errors. If you get one of these, you must disconnect the socket and
+ * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the
+ * descriptor.
+ */
export class PeerHandleError extends CommonBase {
/* @internal */
public constructor(_dummy: object, ptr: number) {
super(ptr, bindings.PeerHandleError_free);
}
+ /**
+ * Used to indicate that we probably can't make any future connections to this peer, implying
+ * we should go ahead and force-close any channels we have with it.
+ */
public get_no_connection_possible(): boolean {
const ret: boolean = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
return ret;
}
+ /**
+ * Used to indicate that we probably can't make any future connections to this peer, implying
+ * we should go ahead and force-close any channels we have with it.
+ */
public set_no_connection_possible(val: boolean): void {
bindings.PeerHandleError_set_no_connection_possible(this.ptr, val);
}
+ /**
+ * Constructs a new PeerHandleError given each field
+ */
public static constructor_new(no_connection_possible_arg: boolean): PeerHandleError {
const ret: number = bindings.PeerHandleError_new(no_connection_possible_arg);
const ret_hu_conv: PeerHandleError = new PeerHandleError(null, ret);
return ret;
}
+ /**
+ * Creates a copy of the PeerHandleError
+ */
public clone(): PeerHandleError {
const ret: number = bindings.PeerHandleError_clone(this.ptr);
const ret_hu_conv: PeerHandleError = new PeerHandleError(null, ret);