Class reference

UPNPDevice

Inherits RefCounted

Universal Plug and Play (UPnP) device.

Description

Universal Plug and Play (UPnP) device. See UPNP for UPnP discovery and utility functions. Provides low-level access to UPNP control commands. Allows to manage port mappings (port forwarding) and to query network information of the device (like local and external IP address and status). Note that methods on this class are synchronous and block the calling thread.

Properties

String description_url = ""

URL to the device description.

String igd_control_url = ""

IDG control URL.

String igd_our_addr = ""

Address of the local machine in the network connecting it to this UPNPDevice.

String igd_service_type = ""

IGD service type.

int igd_status = 9

IGD status.

String service_type = ""

Service type.

Methods

bool is_valid_gateway() const

Returns true if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.

String query_external_address() const

Returns the external IP address of this UPNPDevice or an empty string.

Constants

IGD_STATUS_OK = 0

Enum: IGDStatus

OK.

IGD_STATUS_HTTP_ERROR = 1

Enum: IGDStatus

HTTP error.

IGD_STATUS_HTTP_EMPTY = 2

Enum: IGDStatus

Empty HTTP response.

IGD_STATUS_NO_URLS = 3

Enum: IGDStatus

Deprecated.

This value is no longer used.

Returned response contained no URLs.

IGD_STATUS_NO_IGD = 4

Enum: IGDStatus

Not a valid IGD.

IGD_STATUS_DISCONNECTED = 5

Enum: IGDStatus

Disconnected.

IGD_STATUS_UNKNOWN_DEVICE = 6

Enum: IGDStatus

Unknown device.

IGD_STATUS_INVALID_CONTROL = 7

Enum: IGDStatus

Invalid control.

IGD_STATUS_MALLOC_ERROR = 8

Enum: IGDStatus

Deprecated.

This value is no longer used.

Memory allocation error.

IGD_STATUS_UNKNOWN_ERROR = 9

Enum: IGDStatus

Unknown error.

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.