Class UPNPDevice
Universal Plug and Play (UPnP) device.
- Inheritance
-
UPNPDevice
Remarks
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
description_url
URL to the device description.
var description_url : String = ""
Property Value
Remarks
igd_control_url
IDG control URL.
var igd_control_url : String = ""
Property Value
Remarks
igd_our_addr
Address of the local machine in the network connecting it to this UPNPDevice.
var igd_our_addr : String = ""
Property Value
Remarks
igd_service_type
IGD service type.
var igd_service_type : String = ""
Property Value
Remarks
igd_status
IGD status. See IGDStatus.
var igd_status : int = 9
Property Value
Remarks
service_type
Service type.
var service_type : String = ""
Property Value
Remarks
Methods
add_port_mapping(int, int, String, String, int)
Qualifiers: const
Adds a port mapping to forward the given external port on this UPNPDevice for the given protocol to the local machine. See UPNP.add_port_mapping.
int add_port_mapping(int port, int port_internal, String desc, String proto, int duration)
Parameters
delete_port_mapping(int, String)
Qualifiers: const
Deletes the port mapping identified by the given port and protocol combination on this device. See UPNP.delete_port_mapping.
int delete_port_mapping(int port, String proto)
Parameters
is_valid_gateway
Qualifiers: const
Returns true
if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.
bool is_valid_gateway
query_external_address
Qualifiers: const
Returns the external IP address of this UPNPDevice or an empty string.
String query_external_address