Skip to content

Class UpnpClient

🏭 Constructors

constructor

ts
new UpnpClient(ssdp: Ssdp): UpnpClient

Parameters

  • ssdp: Ssdp

Return Type

  • UpnpClient

Defined in: packages/nat-api/lib/upnp.ts:72

🏷️ Properties

_destroyed private

ts
_destroyed: boolean

Defined in: packages/nat-api/lib/upnp.ts:65

address private

ts
address: undefined | AddressInfo

Defined in: packages/nat-api/lib/upnp.ts:67

device private

ts
device: undefined | Device

Defined in: packages/nat-api/lib/upnp.ts:66

expiredAt private

ts
expiredAt: number = 0

Defined in: packages/nat-api/lib/upnp.ts:68

promise private

ts
promise: undefined | Promise<Object>

Defined in: packages/nat-api/lib/upnp.ts:70

ssdp private

ts
ssdp: Ssdp

Defined in: packages/nat-api/lib/upnp.ts:72

timeout readonly

ts
timeout: number

Defined in: packages/nat-api/lib/upnp.ts:64

ttl private

ts
ttl: number = 300_000

Defined in: packages/nat-api/lib/upnp.ts:69

🔧 Methods

destroy

ts
destroy(): void

Return Type

  • void

Defined in: packages/nat-api/lib/upnp.ts:264

externalIp

ts
externalIp(): Promise<string>

Return Type

  • Promise<string>

Defined in: packages/nat-api/lib/upnp.ts:201

findGateway

ts
findGateway(): Promise<Object>

Return Type

  • Promise<Object>

Defined in: packages/nat-api/lib/upnp.ts:220

getMappings

ts
getMappings(options: GetMappingOptions= {}): Promise<MappingInfo[]>

Parameters

  • options: GetMappingOptions

Return Type

  • Promise<MappingInfo[]>

Defined in: packages/nat-api/lib/upnp.ts:139

map

ts
map(options: UpnpMapOptions): Promise<void>

Parameters

  • options: UpnpMapOptions

Return Type

  • Promise<void>

Defined in: packages/nat-api/lib/upnp.ts:77

unmap

ts
unmap(options: UpnpUnmapOptions): Promise<boolean>

Parameters

  • options: UpnpUnmapOptions

Return Type

  • Promise<boolean>

Defined in: packages/nat-api/lib/upnp.ts:109