mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 18:31:54 +00:00
14 lines
390 B
TypeScript
14 lines
390 B
TypeScript
import { Effects } from "../types";
|
|
import { LocalBinding } from "./LocalBinding";
|
|
|
|
export class LocalPort {
|
|
constructor(readonly effects: Effects, readonly id: string) {}
|
|
async bindLan(internalPort: number) {
|
|
const [localAddress, ipAddress] = await this.effects.bindLan({
|
|
internalPort,
|
|
name: this.id,
|
|
});
|
|
return new LocalBinding(localAddress, ipAddress);
|
|
}
|
|
}
|