X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FPeerHandleError.mts;h=30049f6d04410311cd46cc092b2eade3e7f8214d;hp=84b9a2b9177a730e19f4b83b7ddd2bb2e4676236;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=d1d0121c000b713c10fd0bedd249eb8dda2e4db7 diff --git a/ts/structs/PeerHandleError.mts b/ts/structs/PeerHandleError.mts index 84b9a2b9..30049f6d 100644 --- a/ts/structs/PeerHandleError.mts +++ b/ts/structs/PeerHandleError.mts @@ -281,21 +281,37 @@ import CommonBase from './CommonBase.mjs'; 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); @@ -308,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);