Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
- AESContext
- AStar2D
- AStar3D
- AStarGrid2D
- AudioEffectInstance (1)
- AudioSample
- AudioSamplePlayback
- AudioStreamPlayback (5)
- CameraFeed
- CharFXTransform
- ConfigFile
- Crypto
- DTLSServer
- DirAccess
- ENetConnection
- EditorContextMenuPlugin
- EditorDebuggerPlugin
- EditorDebuggerSession
- EditorExportPlatform (6)
- EditorExportPlugin
- EditorExportPreset
- EditorFeatureProfile
- EditorFileSystemImportFormatSupportQuery
- EditorInspectorPlugin
- EditorResourceConversionPlugin
- EditorResourcePreviewGenerator
- EditorResourceTooltipPlugin
- EditorSceneFormatImporter (4)
- EditorScenePostImport
- EditorScenePostImportPlugin
- EditorScript
- EditorTranslationParserPlugin
- EncodedObjectAsID
- EngineProfiler
- Expression
- FileAccess
- GLTFObjectModelProperty
- HMACContext
- HTTPClient
- HashingContext
- ImageFormatLoader (1)
- JavaClass
- JavaObject
- JavaScriptObject
- KinematicCollision2D
- KinematicCollision3D
- Lightmapper (1)
- MeshConvexDecompositionSettings
- MeshDataTool
- MultiplayerAPI (2)
- Mutex
- NavigationPathQueryParameters2D
- NavigationPathQueryParameters3D
- NavigationPathQueryResult2D
- NavigationPathQueryResult3D
- Node3DGizmo (1)
- OggPacketSequencePlayback
- OpenXRAPIExtension
- PCKPacker
- PackedDataContainerRef
- PacketPeer (8)
- PhysicsPointQueryParameters2D
- PhysicsPointQueryParameters3D
- PhysicsRayQueryParameters2D
- PhysicsRayQueryParameters3D
- PhysicsShapeQueryParameters2D
- PhysicsShapeQueryParameters3D
- PhysicsTestMotionParameters2D
- PhysicsTestMotionParameters3D
- PhysicsTestMotionResult2D
- PhysicsTestMotionResult3D
- RDAttachmentFormat
- RDFramebufferPass
- RDPipelineColorBlendState
- RDPipelineColorBlendStateAttachment
- RDPipelineDepthStencilState
- RDPipelineMultisampleState
- RDPipelineRasterizationState
- RDPipelineSpecializationConstant
- RDSamplerState
- RDShaderSource
- RDTextureFormat
- RDTextureView
- RDUniform
- RDVertexAttribute
- RandomNumberGenerator
- RegEx
- RegExMatch
- RenderSceneBuffers (2)
- RenderSceneBuffersConfiguration
- Resource (103)
- ResourceFormatLoader
- ResourceFormatSaver
- ResourceImporter (16)
- SceneState
- SceneTreeTimer
- Semaphore
- SkinReference
- StreamPeer (5)
- SurfaceTool
- TCPServer
- TLSOptions
- TextLine
- TextParagraph
- TextServer (1)
- Thread
- TranslationDomain
- TriangleMesh
- Tween
- Tweener (5)
- UDPServer
- UPNP
- UPNPDevice
- WeakRef
- WebRTCPeerConnection (1)
- XMLParser
- XRInterface (4)
- XRPose
- XRTracker (2)
- ZIPPacker
- ZIPReader
Table of contents
-
var description_url: String = "" -
var igd_control_url: String = "" -
var igd_our_addr: String = "" -
var igd_service_type: String = "" -
var igd_status = IGD_STATUS_UNKNOWN_ERROR -
var service_type: String = "" -
const func add_port_mapping(duration: int = 0) -> int -
const func delete_port_mapping(proto: String = "UDP") -> int -
const func is_valid_gateway() -> bool -
const func query_external_address() -> String -
const IGD_STATUS_OK = 0 enum IGDStatus -
const IGD_STATUS_HTTP_ERROR = 1 enum IGDStatus -
const IGD_STATUS_HTTP_EMPTY = 2 enum IGDStatus -
const IGD_STATUS_NO_URLS = 3 enum IGDStatusDeprecated -
const IGD_STATUS_NO_IGD = 4 enum IGDStatus -
const IGD_STATUS_DISCONNECTED = 5 enum IGDStatus -
const IGD_STATUS_UNKNOWN_DEVICE = 6 enum IGDStatus -
const IGD_STATUS_INVALID_CONTROL = 7 enum IGDStatus -
const IGD_STATUS_MALLOC_ERROR = 8 enum IGDStatusDeprecated -
const IGD_STATUS_UNKNOWN_ERROR = 9 enum IGDStatus -
enum IGDStatus
UPNPDevice #
is_refcounted, is_instantiable, core, not_builtin_classes
Universal Plug and Play (UPnP) device.
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.
Members #
var description_url: String = ""#
URL to the device description.
var igd_control_url: String = ""#
IDG control URL.
var igd_our_addr: String = ""#
Address of the local machine in the network connecting it to this UPNPDevice.
var igd_service_type: String = ""#
IGD service type.
var igd_status = IGD_STATUS_UNKNOWN_ERROR#
IGD status. See IGDStatus.
var service_type: String = ""#
Service type.
Methods #
const func add_port_mapping(duration: int = 0) -> int#
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.
const func delete_port_mapping(proto: String = "UDP") -> int#
Deletes the port mapping identified by the given port and protocol combination on this device. See UPNP.delete_port_mapping.
const func is_valid_gateway() -> bool#
Returns true if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.
const func query_external_address() -> String#
Returns the external IP address of this UPNPDevice or an empty string.
Annotations #
Constants #
const IGD_STATUS_OK = 0 enum IGDStatus#
OK.
const IGD_STATUS_HTTP_ERROR = 1 enum IGDStatus#
HTTP error.
const IGD_STATUS_HTTP_EMPTY = 2 enum IGDStatus#
Empty HTTP response.
const IGD_STATUS_NO_URLS = 3 enum IGDStatusDeprecated#
Returned response contained no URLs.
const IGD_STATUS_NO_IGD = 4 enum IGDStatus#
Not a valid IGD.
const IGD_STATUS_DISCONNECTED = 5 enum IGDStatus#
Disconnected.
const IGD_STATUS_UNKNOWN_DEVICE = 6 enum IGDStatus#
Unknown device.
const IGD_STATUS_INVALID_CONTROL = 7 enum IGDStatus#
Invalid control.
const IGD_STATUS_MALLOC_ERROR = 8 enum IGDStatusDeprecated#
Memory allocation error.
const IGD_STATUS_UNKNOWN_ERROR = 9 enum IGDStatus#
Unknown error.
Constructors #
Enums #
IGDStatus#
enum IGDStatus {
IGD_STATUS_OK = 0,
IGD_STATUS_HTTP_ERROR = 1,
IGD_STATUS_HTTP_EMPTY = 2,
IGD_STATUS_NO_URLS = 3,
IGD_STATUS_NO_IGD = 4,
IGD_STATUS_DISCONNECTED = 5,
IGD_STATUS_UNKNOWN_DEVICE = 6,
IGD_STATUS_INVALID_CONTROL = 7,
IGD_STATUS_MALLOC_ERROR = 8,
IGD_STATUS_UNKNOWN_ERROR = 9,
}