X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FPeerHandleError.mts;h=30049f6d04410311cd46cc092b2eade3e7f8214d;hp=75912c714c500e64db6095b95f4573c4c7da8c96;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=2a65456aa0b540060dcf3ca707a54dc98cc3f38a diff --git a/ts/structs/PeerHandleError.mts b/ts/structs/PeerHandleError.mts index 75912c71..30049f6d 100644 --- a/ts/structs/PeerHandleError.mts +++ b/ts/structs/PeerHandleError.mts @@ -279,24 +279,39 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' -import * as InternalUtils from '../InternalUtils.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); @@ -309,6 +324,9 @@ export class PeerHandleError extends CommonBase { 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);