mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
Currently including `zh_CN` and `es` which both have very high completion ratios. Others will be added once they reach a significant percentage too. These RST files will be used by godot-docs in place of its `classes` folder after we sync with https://github.com/godotengine/godot-docs/pull/5458. The update workflow is manual for now (example for `zh_CN`): - Build `godotengine/godot` in the branch we currently track (now `3.x`) - Run `godot --doctool -l zh_CN` - Run `cd doc && make rst LANGARG=zh_CN` - Copy `doc/_build/rst/*` to `classes/zh_CN/` here - Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
382 lines
22 KiB
ReStructuredText
382 lines
22 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the UPNP.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_UPNP:
|
|
|
|
UPNP
|
|
====
|
|
|
|
**Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Funciones de red de UPNP.
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
Provides UPNP functionality to discover :ref:`UPNPDevice<class_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:
|
|
|
|
::
|
|
|
|
const PORT = 7777
|
|
var upnp = UPNP.new()
|
|
upnp.discover(2000, 2, "InternetGatewayDevice")
|
|
upnp.add_port_mapping(port)
|
|
|
|
To close a specific port (e.g. after you have finished using it):
|
|
|
|
::
|
|
|
|
upnp.delete_port_mapping(port)
|
|
|
|
\ **Note:** UPnP discovery blocks the current thread. To perform discovery without blocking the main thread, use :ref:`Thread<class_Thread>`\ s like this:
|
|
|
|
::
|
|
|
|
# Emitted when UPnP port mapping setup is completed (regardless of success or failure).
|
|
signal upnp_completed(error)
|
|
|
|
# Replace this with your own server port number between 1025 and 65535.
|
|
const SERVER_PORT = 3928
|
|
var thread = null
|
|
|
|
func _upnp_setup(server_port):
|
|
# UPNP queries take some time.
|
|
var upnp = UPNP.new()
|
|
var err = upnp.discover()
|
|
|
|
if err != OK:
|
|
push_error(str(err))
|
|
emit_signal("upnp_completed", err)
|
|
return
|
|
|
|
if upnp.get_gateway() and upnp.get_gateway().is_valid_gateway():
|
|
upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "UDP")
|
|
upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "TCP")
|
|
emit_signal("upnp_completed", OK)
|
|
|
|
func _ready():
|
|
thread = Thread.new()
|
|
thread.start(self, "_upnp_setup", SERVER_PORT)
|
|
|
|
func _exit_tree():
|
|
# Wait for thread finish here to handle game exit while the thread is running.
|
|
thread.wait_to_finish()
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
+-----------------------------+-------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`discover_ipv6<class_UPNP_property_discover_ipv6>` | ``false`` |
|
|
+-----------------------------+-------------------------------------------------------------------------+-----------+
|
|
| :ref:`int<class_int>` | :ref:`discover_local_port<class_UPNP_property_discover_local_port>` | ``0`` |
|
|
+-----------------------------+-------------------------------------------------------------------------+-----------+
|
|
| :ref:`String<class_String>` | :ref:`discover_multicast_if<class_UPNP_property_discover_multicast_if>` | ``""`` |
|
|
+-----------------------------+-------------------------------------------------------------------------+-----------+
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_device<class_UPNP_method_add_device>` **(** :ref:`UPNPDevice<class_UPNPDevice>` device **)** |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`add_port_mapping<class_UPNP_method_add_port_mapping>` **(** :ref:`int<class_int>` port, :ref:`int<class_int>` port_internal=0, :ref:`String<class_String>` desc="", :ref:`String<class_String>` proto="UDP", :ref:`int<class_int>` duration=0 **)** |const| |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`clear_devices<class_UPNP_method_clear_devices>` **(** **)** |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`delete_port_mapping<class_UPNP_method_delete_port_mapping>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` proto="UDP" **)** |const| |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`discover<class_UPNP_method_discover>` **(** :ref:`int<class_int>` timeout=2000, :ref:`int<class_int>` ttl=2, :ref:`String<class_String>` device_filter="InternetGatewayDevice" **)** |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`UPNPDevice<class_UPNPDevice>` | :ref:`get_device<class_UPNP_method_get_device>` **(** :ref:`int<class_int>` index **)** |const| |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_device_count<class_UPNP_method_get_device_count>` **(** **)** |const| |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`UPNPDevice<class_UPNPDevice>` | :ref:`get_gateway<class_UPNP_method_get_gateway>` **(** **)** |const| |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`query_external_address<class_UPNP_method_query_external_address>` **(** **)** |const| |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_device<class_UPNP_method_remove_device>` **(** :ref:`int<class_int>` index **)** |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_device<class_UPNP_method_set_device>` **(** :ref:`int<class_int>` index, :ref:`UPNPDevice<class_UPNPDevice>` device **)** |
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Enumeraciones
|
|
--------------------------
|
|
|
|
.. _enum_UPNP_UPNPResult:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_SUCCESS:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_NOT_AUTHORIZED:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_PORT_MAPPING_NOT_FOUND:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INCONSISTENT_PARAMETERS:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_ACTION_FAILED:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_NO_PORT_MAPS_AVAILABLE:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_SAME_PORT_VALUES_REQUIRED:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INVALID_GATEWAY:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INVALID_PORT:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INVALID_PROTOCOL:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INVALID_DURATION:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INVALID_ARGS:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INVALID_RESPONSE:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_INVALID_PARAM:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_HTTP_ERROR:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_SOCKET_ERROR:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_MEM_ALLOC_ERROR:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_NO_GATEWAY:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_NO_DEVICES:
|
|
|
|
.. _class_UPNP_constant_UPNP_RESULT_UNKNOWN_ERROR:
|
|
|
|
enum **UPNPResult**:
|
|
|
|
- **UPNP_RESULT_SUCCESS** = **0** --- El comando o descubrimiento de la UPNP fue exitoso.
|
|
|
|
- **UPNP_RESULT_NOT_AUTHORIZED** = **1** --- No está autorizado a usar el comando en el :ref:`UPNPDevice<class_UPNPDevice>`. Puede ser devuelto cuando el usuario deshabilite el UPNP en su router.
|
|
|
|
- **UPNP_RESULT_PORT_MAPPING_NOT_FOUND** = **2** --- No se encontró ningún mapeo de puerto para la combinación de protocolos del :ref:`UPNPDevice<class_UPNPDevice>` dado.
|
|
|
|
- **UPNP_RESULT_INCONSISTENT_PARAMETERS** = **3** --- Parámetros inconsistentes.
|
|
|
|
- **UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY** = **4** --- No hay tal entrada en el array. Puede ser devuelto si un puerto dado, la combinación de protocolos no se encuentra en un :ref:`UPNPDevice<class_UPNPDevice>`.
|
|
|
|
- **UPNP_RESULT_ACTION_FAILED** = **5** --- La acción falló.
|
|
|
|
- **UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED** = **6** --- El :ref:`UPNPDevice<class_UPNPDevice>` no permite valores comodín para la dirección IP de origen.
|
|
|
|
- **UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED** = **7** --- El :ref:`UPNPDevice<class_UPNPDevice>` no permite valores comodín para el puerto externo.
|
|
|
|
- **UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED** = **8** --- El :ref:`UPNPDevice<class_UPNPDevice>` no permite valores comodín para el puerto interno.
|
|
|
|
- **UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD** = **9** --- El valor del host remoto debe ser un comodín.
|
|
|
|
- **UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD** = **10** --- El valor del puerto externo debe ser un comodín.
|
|
|
|
- **UPNP_RESULT_NO_PORT_MAPS_AVAILABLE** = **11** --- No hay mapas de puertos disponibles. También puede ser devuelto si la funcionalidad de mapas de puertos no está disponible.
|
|
|
|
- **UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM** = **12** --- Conflicto con otro mecanismo. Puede ser devuelto en lugar de :ref:`UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING<class_UPNP_constant_UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING>` si un mapeo de puertos entra en conflicto con uno existente.
|
|
|
|
- **UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING** = **13** --- Conflicto con una mapeo de puertos existente.
|
|
|
|
- **UPNP_RESULT_SAME_PORT_VALUES_REQUIRED** = **14** --- Los valores de los puertos externos e internos deben ser los mismos.
|
|
|
|
- **UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED** = **15** --- Sólo se admiten los arrendamientos permanentes. No utilice el parámetro ``duration`` cuando añada mapeos de puertos.
|
|
|
|
- **UPNP_RESULT_INVALID_GATEWAY** = **16** --- Gateway invalida.
|
|
|
|
- **UPNP_RESULT_INVALID_PORT** = **17** --- Puerto inválido.
|
|
|
|
- **UPNP_RESULT_INVALID_PROTOCOL** = **18** --- Protocolo inválido.
|
|
|
|
- **UPNP_RESULT_INVALID_DURATION** = **19** --- Duración inválida.
|
|
|
|
- **UPNP_RESULT_INVALID_ARGS** = **20** --- Argumentos inválidos.
|
|
|
|
- **UPNP_RESULT_INVALID_RESPONSE** = **21** --- Respuesta inválida.
|
|
|
|
- **UPNP_RESULT_INVALID_PARAM** = **22** --- Parámetro inválido.
|
|
|
|
- **UPNP_RESULT_HTTP_ERROR** = **23** --- Error HTTP.
|
|
|
|
- **UPNP_RESULT_SOCKET_ERROR** = **24** --- Error de socket.
|
|
|
|
- **UPNP_RESULT_MEM_ALLOC_ERROR** = **25** --- Error en la asignación de la memoria.
|
|
|
|
- **UPNP_RESULT_NO_GATEWAY** = **26** --- No hay ninguna gateway disponible. Puede que tengas que llamar a :ref:`discover<class_UPNP_method_discover>` primero, o el descubrimiento no detectó ningúna IGD (InternetGatewayDevices) válida.
|
|
|
|
- **UPNP_RESULT_NO_DEVICES** = **27** --- No hay dispositivos disponibles. Puede que tengas que llamar a :ref:`discover<class_UPNP_method_discover>` primero, o el descubrimiento no detectó ninguna :ref:`UPNPDevice<class_UPNPDevice>` válida.
|
|
|
|
- **UPNP_RESULT_UNKNOWN_ERROR** = **28** --- Error desconocido.
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_UPNP_property_discover_ipv6:
|
|
|
|
- :ref:`bool<class_bool>` **discover_ipv6**
|
|
|
|
+-----------+--------------------------+
|
|
| *Default* | ``false`` |
|
|
+-----------+--------------------------+
|
|
| *Setter* | set_discover_ipv6(value) |
|
|
+-----------+--------------------------+
|
|
| *Getter* | is_discover_ipv6() |
|
|
+-----------+--------------------------+
|
|
|
|
Si ``true``, IPv6 se utiliza para el descubrimiento de :ref:`UPNPDevice<class_UPNPDevice>`.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_property_discover_local_port:
|
|
|
|
- :ref:`int<class_int>` **discover_local_port**
|
|
|
|
+-----------+--------------------------------+
|
|
| *Default* | ``0`` |
|
|
+-----------+--------------------------------+
|
|
| *Setter* | set_discover_local_port(value) |
|
|
+-----------+--------------------------------+
|
|
| *Getter* | get_discover_local_port() |
|
|
+-----------+--------------------------------+
|
|
|
|
Si ``0``, el puerto local a utilizar para el descubrimiento es elegido automáticamente por el sistema. Si ``1``, el descubrimiento se hará desde el puerto de origen 1900 (el mismo que el puerto de destino). De lo contrario, el valor se utilizará como el puerto.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_property_discover_multicast_if:
|
|
|
|
- :ref:`String<class_String>` **discover_multicast_if**
|
|
|
|
+-----------+----------------------------------+
|
|
| *Default* | ``""`` |
|
|
+-----------+----------------------------------+
|
|
| *Setter* | set_discover_multicast_if(value) |
|
|
+-----------+----------------------------------+
|
|
| *Getter* | get_discover_multicast_if() |
|
|
+-----------+----------------------------------+
|
|
|
|
Interfaz de multidifusión para usar para el descubrimiento. Utiliza la interfaz de multidifusión predeterminada si está vacía.
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_UPNP_method_add_device:
|
|
|
|
- void **add_device** **(** :ref:`UPNPDevice<class_UPNPDevice>` device **)**
|
|
|
|
Añade el :ref:`UPNPDevice<class_UPNPDevice>` dado a la lista de dispositivos descubiertos.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_add_port_mapping:
|
|
|
|
- :ref:`int<class_int>` **add_port_mapping** **(** :ref:`int<class_int>` port, :ref:`int<class_int>` port_internal=0, :ref:`String<class_String>` desc="", :ref:`String<class_String>` proto="UDP", :ref:`int<class_int>` duration=0 **)** |const|
|
|
|
|
Añade un mapeo para reenviar el ``port`` externo (entre 1 y 65535) en la pasarela por defecto (ver :ref:`get_gateway<class_UPNP_method_get_gateway>`) al ``internal_port`` en la máquina local para el protocolo dado ``proto`` (ya sea ``TCP`` o ``UDP``, siendo UDP el predeterminado). Si ya existe un mapeo de puertos para la combinación de puertos y protocolos dada en ese dispositivo de entrada, este método intenta sobrescribirlo. Si no se desea, se puede recuperar la pasarela manualmente con :ref:`get_gateway<class_UPNP_method_get_gateway>` y llamar a :ref:`add_port_mapping<class_UPNP_method_add_port_mapping>` en ella, si existe.
|
|
|
|
Si ``internal_port`` es ``0`` (el valor por defecto), se utiliza el mismo número de puerto tanto para el puerto externo como para el interno (el valor de ``port``).
|
|
|
|
La descripción (``desc``) se muestra en algunas interfaces de routers y puede utilizarse para señalar qué aplicación añadió el mapeo. La duración del arrendamiento de la cartografía puede limitarse especificando una duración ``duration`` (en segundos). Sin embargo, algunos enrutadores son incompatibles con uno o ambos, por lo que hay que utilizarlos con precaución y añadir una lógica de reserva en caso de errores para volver a intentarlo sin ellos en caso de duda.
|
|
|
|
Véase :ref:`UPNPResult<enum_UPNP_UPNPResult>` para los posibles valores de retorno.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_clear_devices:
|
|
|
|
- void **clear_devices** **(** **)**
|
|
|
|
Borra la lista de dispositivos descubiertos.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_delete_port_mapping:
|
|
|
|
- :ref:`int<class_int>` **delete_port_mapping** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` proto="UDP" **)** |const|
|
|
|
|
Elimina la asignación de puertos para la combinación de puertos y protocolos dada en la pasarela por defecto (ver :ref:`get_gateway<class_UPNP_method_get_gateway>`) si existe. ``port`` debe ser un puerto válido entre 1 y 65535, ``proto`` puede ser ``TCP`` o ``UDP``. Ver :ref:`UPNPResult<enum_UPNP_UPNPResult>` para los posibles valores de retorno.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_discover:
|
|
|
|
- :ref:`int<class_int>` **discover** **(** :ref:`int<class_int>` timeout=2000, :ref:`int<class_int>` ttl=2, :ref:`String<class_String>` device_filter="InternetGatewayDevice" **)**
|
|
|
|
Descubre los dispositivos locales :ref:`UPNPDevice<class_UPNPDevice>`. Borra la lista de dispositivos descubiertos anteriormente.
|
|
|
|
Filtra los dispositivos de tipo IGD (InternetGatewayDevice) por defecto, ya que éstos gestionan el reenvío de puertos. ``timeout`` es el tiempo de espera de las respuestas en milisegundos. ``ttl`` es el tiempo de vida; sólo toca esto si sabes lo que estás haciendo.
|
|
|
|
Ver :ref:`UPNPResult<enum_UPNP_UPNPResult>` para los posibles valores de retorno.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_get_device:
|
|
|
|
- :ref:`UPNPDevice<class_UPNPDevice>` **get_device** **(** :ref:`int<class_int>` index **)** |const|
|
|
|
|
Devuelve el :ref:`UPNPDevice<class_UPNPDevice>` en el ``index`` dado.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_get_device_count:
|
|
|
|
- :ref:`int<class_int>` **get_device_count** **(** **)** |const|
|
|
|
|
Devuelve el número de :ref:`UPNPDevice<class_UPNPDevice>` descubiertos.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_get_gateway:
|
|
|
|
- :ref:`UPNPDevice<class_UPNPDevice>` **get_gateway** **(** **)** |const|
|
|
|
|
Devuelve la puerta de enlace por defecto. Es el primer dispositivo descubierto :ref:`UPNPDevice<class_UPNPDevice>` que también es un IGD (InternetGatewayDevice) válido.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_query_external_address:
|
|
|
|
- :ref:`String<class_String>` **query_external_address** **(** **)** |const|
|
|
|
|
Devuelve la dirección :ref:`IP<class_IP>` externa de la pasarela por defecto (ver :ref:`get_gateway<class_UPNP_method_get_gateway>`) como string. Devuelve una string vacía en caso de error.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_remove_device:
|
|
|
|
- void **remove_device** **(** :ref:`int<class_int>` index **)**
|
|
|
|
Elimina el dispositivo en el ``index`` de la lista de dispositivos descubiertos.
|
|
|
|
----
|
|
|
|
.. _class_UPNP_method_set_device:
|
|
|
|
- void **set_device** **(** :ref:`int<class_int>` index, :ref:`UPNPDevice<class_UPNPDevice>` device **)**
|
|
|
|
Establece el dispositivo en ``index`` de la lista de dispositivos descubiertos a ``device``.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|