Class PmpClient
🏭 Constructors
constructor
ts
new PmpClient(gateway: string, socket: Socket): PmpClient
Parameters
- gateway:
string
- socket:
Socket
Return Type
PmpClient
Defined in: packages/nat-api/lib/pmp.ts:56
🏷️ Properties
_promise
ts
_promise: Promise<void> = ...
Defined in: packages/nat-api/lib/pmp.ts:54
gateway
ts
gateway: string
Defined in: packages/nat-api/lib/pmp.ts:56
socket
ts
socket: Socket
Defined in: packages/nat-api/lib/pmp.ts:56
🔧 Methods
_request
ts
_request(op: number, obj: PmpMapOptions): Promise<void>
Queues a UDP request to be send to the gateway device.
Parameters
- op:
number
- obj:
PmpMapOptions
Return Type
Promise<void>
Defined in: packages/nat-api/lib/pmp.ts:96
close
ts
close(): void
Return Type
void
Defined in: packages/nat-api/lib/pmp.ts:87
externalIp
ts
externalIp(): Promise<void>
Return Type
Promise<void>
Defined in: packages/nat-api/lib/pmp.ts:82
map
ts
map(opts: PmpMapOptions): Promise<void>
Parameters
- opts:
PmpMapOptions
Return Type
Promise<void>
Defined in: packages/nat-api/lib/pmp.ts:60
unmap
ts
unmap(opts: PmpMapOptions): Promise<void>
Parameters
- opts:
PmpMapOptions
Return Type
Promise<void>
Defined in: packages/nat-api/lib/pmp.ts:76