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

ts
_destroyed: boolean

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

address

ts
address: undefined | AddressInfo

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

device

ts
device: undefined | Device

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

expiredAt

ts
expiredAt: number = 0

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

promise

ts
promise: undefined | Promise<Object>

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

ssdp

ts
ssdp: Ssdp

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

timeout

ts
timeout: number

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

ttl

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

Released under the MIT License.