A running port-forward. Call stop() when done; a garbage-collected handle stops the
forward and cuts its open connections.
Accessors
Section titled “Accessors”localAddress
Section titled “localAddress”Get Signature
Section titled “Get Signature”get localAddress(): string;The local address to connect to, host:port, with the port the OS picked.
Returns
Section titled “Returns”string
running
Section titled “running”Get Signature
Section titled “Get Signature”get running(): boolean;Whether the forward is still serving.
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”stop()
Section titled “stop()”stop(timeout?: number | null): Promise<PortForwardReport>;Stops accepting, waits for the connections still open to end, and resolves with the report.
With timeout (seconds), connections still open after it are cut and listed as
"failed". Without it, a client that keeps its connection open keeps this waiting.
Callable again, with the same report.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
timeout? |
number | null |
Returns
Section titled “Returns”Promise<PortForwardReport>
toString()
Section titled “toString()”toString(): string;The handle without its credentials.
Returns
Section titled “Returns”string
Provenance
Section titled “Provenance”This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.
To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.