1 | import type { MacAddress } from "hap-nodejs";
|
2 | import type { ChildBridgeFork } from "./childBridgeFork";
|
3 | export interface ExternalPortsConfiguration {
|
4 | start: number;
|
5 | end: number;
|
6 | }
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare class ExternalPortService {
|
12 | private externalPorts?;
|
13 | private nextExternalPort?;
|
14 | private allocatedPorts;
|
15 | constructor(externalPorts?: ExternalPortsConfiguration | undefined);
|
16 | /**
|
17 | * Returns the next available port in the external port config.
|
18 | * If the external port is not configured by the user it will return null.
|
19 | * If the port range has been exhausted it will return null.
|
20 | */
|
21 | requestPort(username: MacAddress): Promise<number | undefined>;
|
22 | private getNextFreePort;
|
23 | }
|
24 | /**
|
25 | * This is the child bridge version of the port allocation service.
|
26 | * It requests a free port from the main bridge's port service.
|
27 | */
|
28 | export declare class ChildBridgeExternalPortService extends ExternalPortService {
|
29 | private childBridge;
|
30 | constructor(childBridge: ChildBridgeFork);
|
31 | requestPort(username: MacAddress): Promise<number | undefined>;
|
32 | }
|
33 | //# sourceMappingURL=externalPortService.d.ts.map |
\ | No newline at end of file |