Click or drag to resize

UPNPDiscover Method

Discovers local UPNPDevices. Clears the list of previously discovered devices.

Filters for IGD (InternetGatewayDevice) type devices by default, as those manage port forwarding. timeout is the time to wait for responses in milliseconds. ttl is the time-to-live; only touch this if you know what you're doing.

See UPNPUPNPResult for possible return values.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public int Discover(
	int timeout = 2000,
	int ttl = 2,
	string deviceFilter = "InternetGatewayDevice"
)

Parameters

timeout (Optional)
Type: SystemInt32

[Missing <param name="timeout"/> documentation for "M:Godot.UPNP.Discover(System.Int32,System.Int32,System.String)"]

ttl (Optional)
Type: SystemInt32

[Missing <param name="ttl"/> documentation for "M:Godot.UPNP.Discover(System.Int32,System.Int32,System.String)"]

deviceFilter (Optional)
Type: SystemString

[Missing <param name="deviceFilter"/> documentation for "M:Godot.UPNP.Discover(System.Int32,System.Int32,System.String)"]

Return Value

Type: Int32

[Missing <returns> documentation for "M:Godot.UPNP.Discover(System.Int32,System.Int32,System.String)"]

See Also