Skip to content

@pumpkin-plugins/upnpumpkin-api API / client / PortMapClient

Class: PortMapClient ​

Defined in: tools/upnpumpkin-api/src/client.ts:25

Talks to UPnPumpkin from another plugin.

Constructors ​

Constructor ​

new PortMapClient(send): PortMapClient

Defined in: tools/upnpumpkin-api/src/client.ts:27

Creates a client. send is the plugin's IPC call.

Parameters ​

send ​

SendMessage

Returns ​

PortMapClient

Methods ​

ensure() ​

ensure(request): PortStatus

Defined in: tools/upnpumpkin-api/src/client.ts:35

Asks for a port to be made reachable, or checks on it. Repeating a request changes nothing, so call it again to find out how it is going.

Parameters ​

request ​

PortRequest

Returns ​

PortStatus

Throws ​

When UPnPumpkin can't be reached.

Throws ​

When UPnPumpkin refuses the request.


info() ​

info(): NetworkInfo

Defined in: tools/upnpumpkin-api/src/client.ts:59

What UPnPumpkin knows about the network.

Returns ​

NetworkInfo

Throws ​

When UPnPumpkin can't be reached.


release() ​

release(key): void

Defined in: tools/upnpumpkin-api/src/client.ts:51

Stops keeping a port open.

Parameters ​

key ​

string

Returns ​

void

Throws ​

When UPnPumpkin can't be reached.


status() ​

status(key): PortStatus

Defined in: tools/upnpumpkin-api/src/client.ts:43

The state of a port asked for earlier.

Parameters ​

key ​

string

Returns ​

PortStatus

Throws ​

When UPnPumpkin can't be reached.

Pumpkin Plugins documentation