UPNP device.
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.
String | description_url | "" |
String | igd_control_url | "" |
String | igd_our_addr | "" |
String | igd_service_type | "" |
IGDStatus | igd_status | 9 |
String | service_type | "" |
int | add_port_mapping ( int port, int port_internal=0, String desc="", String proto="UDP", int duration=0 ) const |
int | delete_port_mapping ( int port, String proto="UDP" ) const |
bool | is_valid_gateway ( ) const |
String | query_external_address ( ) const |
enum IGDStatus:
Default | "" |
Setter | set_description_url(value) |
Getter | get_description_url() |
URL to the device description.
Default | "" |
Setter | set_igd_control_url(value) |
Getter | get_igd_control_url() |
IDG control URL.
Default | "" |
Setter | set_igd_our_addr(value) |
Getter | get_igd_our_addr() |
Address of the local machine in the network connecting it to this UPNPDevice
.
Default | "" |
Setter | set_igd_service_type(value) |
Getter | get_igd_service_type() |
IGD service type.
Default | 9 |
Setter | set_igd_status(value) |
Getter | get_igd_status() |
IGD status. See IGDStatus.
Default | "" |
Setter | set_service_type(value) |
Getter | get_service_type() |
Service type.
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.
Deletes the port mapping identified by the given port and protocol combination on this device. See UPNP.delete_port_mapping.
Returns true
if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.
Returns the external IP address of this UPNPDevice
or an empty string.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_upnpdevice.html