lightningdevkit
Version:
Lightning Development Kit
44 lines • 1.45 kB
JavaScript
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 */
constructor(_dummy, ptr) {
super(ptr, bindings.PeerHandleError_free);
}
/**
* Constructs a new PeerHandleError given each field
*/
static constructor_new() {
const ret = bindings.PeerHandleError_new();
const ret_hu_conv = new PeerHandleError(null, ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
return ret_hu_conv;
}
clone_ptr() {
const ret = bindings.PeerHandleError_clone_ptr(this.ptr);
return ret;
}
/**
* Creates a copy of the PeerHandleError
*/
clone() {
const ret = bindings.PeerHandleError_clone(this.ptr);
const ret_hu_conv = new PeerHandleError(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
}
/**
* Get the string representation of a PeerHandleError object
*/
to_str() {
const ret = bindings.PeerHandleError_to_str(this.ptr);
const ret_conv = bindings.decodeString(ret);
return ret_conv;
}
}
//# sourceMappingURL=PeerHandleError.mjs.map