summaryrefslogtreecommitdiff
path: root/modules/upnp/doc_classes
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upnp/doc_classes')
-rw-r--r--modules/upnp/doc_classes/UPNP.xml21
-rw-r--r--modules/upnp/doc_classes/UPNPDevice.xml14
2 files changed, 21 insertions, 14 deletions
diff --git a/modules/upnp/doc_classes/UPNP.xml b/modules/upnp/doc_classes/UPNP.xml
index 0f967c993b..aac0932995 100644
--- a/modules/upnp/doc_classes/UPNP.xml
+++ b/modules/upnp/doc_classes/UPNP.xml
@@ -5,11 +5,20 @@
</brief_description>
<description>
Provides UPNP functionality to discover [UPNPDevice]s on the local network and execute commands on them, like managing port mappings (port forwarding) and querying the local and remote network IP address. Note that methods on this class are synchronous and block the calling thread.
+ To forward a specific port:
+ [codeblock]
+ const PORT = 7777
+ var upnp = UPNP.new()
+ upnp.discover(2000, 2, "InternetGatewayDevice")
+ upnp.add_port_mapping(port)
+ [/codeblock]
+ To close a specific port (e.g. after you have finished using it):
+ [codeblock]
+ upnp.delete_port_mapping(port)
+ [/codeblock]
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
<method name="add_device">
<return type="void">
@@ -125,13 +134,13 @@
</method>
</methods>
<members>
- <member name="discover_ipv6" type="bool" setter="set_discover_ipv6" getter="is_discover_ipv6">
+ <member name="discover_ipv6" type="bool" setter="set_discover_ipv6" getter="is_discover_ipv6" default="false">
If [code]true[/code], IPv6 is used for [UPNPDevice] discovery.
</member>
- <member name="discover_local_port" type="int" setter="set_discover_local_port" getter="get_discover_local_port">
+ <member name="discover_local_port" type="int" setter="set_discover_local_port" getter="get_discover_local_port" default="0">
If [code]0[/code], the local port to use for discovery is chosen automatically by the system. If [code]1[/code], discovery will be done from the source port 1900 (same as destination port). Otherwise, the value will be used as the port.
</member>
- <member name="discover_multicast_if" type="String" setter="set_discover_multicast_if" getter="get_discover_multicast_if">
+ <member name="discover_multicast_if" type="String" setter="set_discover_multicast_if" getter="get_discover_multicast_if" default="&quot;&quot;">
Multicast interface to use for discovery. Uses the default multicast interface if empty.
</member>
</members>
@@ -173,7 +182,7 @@
No port maps are available. May also be returned if port mapping functionality is not available.
</constant>
<constant name="UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM" value="12" enum="UPNPResult">
- Conflict with other mechanism. May be returned instead of [code]UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING[/code] if a port mapping conflicts with an existing one.
+ Conflict with other mechanism. May be returned instead of [constant UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING] if a port mapping conflicts with an existing one.
</constant>
<constant name="UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING" value="13" enum="UPNPResult">
Conflict with an existing port mapping.
diff --git a/modules/upnp/doc_classes/UPNPDevice.xml b/modules/upnp/doc_classes/UPNPDevice.xml
index c9b695a651..4d3a0f4f1d 100644
--- a/modules/upnp/doc_classes/UPNPDevice.xml
+++ b/modules/upnp/doc_classes/UPNPDevice.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
<method name="add_port_mapping" qualifiers="const">
<return type="int">
@@ -55,22 +53,22 @@
</method>
</methods>
<members>
- <member name="description_url" type="String" setter="set_description_url" getter="get_description_url">
+ <member name="description_url" type="String" setter="set_description_url" getter="get_description_url" default="&quot;&quot;">
URL to the device description.
</member>
- <member name="igd_control_url" type="String" setter="set_igd_control_url" getter="get_igd_control_url">
+ <member name="igd_control_url" type="String" setter="set_igd_control_url" getter="get_igd_control_url" default="&quot;&quot;">
IDG control URL.
</member>
- <member name="igd_our_addr" type="String" setter="set_igd_our_addr" getter="get_igd_our_addr">
+ <member name="igd_our_addr" type="String" setter="set_igd_our_addr" getter="get_igd_our_addr" default="&quot;&quot;">
Address of the local machine in the network connecting it to this [UPNPDevice].
</member>
- <member name="igd_service_type" type="String" setter="set_igd_service_type" getter="get_igd_service_type">
+ <member name="igd_service_type" type="String" setter="set_igd_service_type" getter="get_igd_service_type" default="&quot;&quot;">
IGD service type.
</member>
- <member name="igd_status" type="int" setter="set_igd_status" getter="get_igd_status" enum="UPNPDevice.IGDStatus">
+ <member name="igd_status" type="int" setter="set_igd_status" getter="get_igd_status" enum="UPNPDevice.IGDStatus" default="9">
IGD status. See [enum IGDStatus].
</member>
- <member name="service_type" type="String" setter="set_service_type" getter="get_service_type">
+ <member name="service_type" type="String" setter="set_service_type" getter="get_service_type" default="&quot;&quot;">
Service type.
</member>
</members>