Documentation ¶
Overview ¶
Package UPNPDevice provides methods for working with UPNPDevice object instances.
Index ¶
- type Advanced
- type Any
- type IGDStatus
- type Instance
- func (self Instance) AddPortMapping(port int) int
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsUPNPDevice() Instance
- func (self Instance) DeletePortMapping(port int) int
- func (self Instance) DescriptionUrl() string
- func (self Instance) IgdControlUrl() string
- func (self Instance) IgdOurAddr() string
- func (self Instance) IgdServiceType() string
- func (self Instance) IgdStatus() gdclass.UPNPDeviceIGDStatus
- func (self Instance) IsValidGateway() bool
- func (self Instance) QueryExternalAddress() string
- func (self Instance) ServiceType() string
- func (self Instance) SetDescriptionUrl(value string)
- func (self Instance) SetIgdControlUrl(value string)
- func (self Instance) SetIgdOurAddr(value string)
- func (self Instance) SetIgdServiceType(value string)
- func (self Instance) SetIgdStatus(value gdclass.UPNPDeviceIGDStatus)
- func (self Instance) SetServiceType(value string)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type IGDStatus ¶
type IGDStatus = gdclass.UPNPDeviceIGDStatus //gd:UPNPDevice.IGDStatus
const ( /*OK.*/ IgdStatusOk IGDStatus = 0 /*HTTP error.*/ IgdStatusHttpError IGDStatus = 1 /*Empty HTTP response.*/ IgdStatusHttpEmpty IGDStatus = 2 /*Returned response contained no URLs.*/ IgdStatusNoUrls IGDStatus = 3 /*Not a valid IGD.*/ IgdStatusNoIgd IGDStatus = 4 /*Disconnected.*/ IgdStatusDisconnected IGDStatus = 5 /*Unknown device.*/ IgdStatusUnknownDevice IGDStatus = 6 /*Invalid control.*/ IgdStatusInvalidControl IGDStatus = 7 /*Memory allocation error.*/ IgdStatusMallocError IGDStatus = 8 /*Unknown error.*/ IgdStatusUnknownError IGDStatus = 9 )
type Instance ¶
type Instance [1]gdclass.UPNPDevice
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.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddPortMapping ¶
Adds a port mapping to forward the given external port on this [UPNPDevice] for the given protocol to the local machine. See [method UPNP.add_port_mapping].
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsUPNPDevice ¶
func (Instance) DeletePortMapping ¶
Deletes the port mapping identified by the given port and protocol combination on this device. See [method UPNP.delete_port_mapping].
func (Instance) DescriptionUrl ¶
func (Instance) IgdControlUrl ¶
func (Instance) IgdOurAddr ¶
func (Instance) IgdServiceType ¶
func (Instance) IgdStatus ¶
func (self Instance) IgdStatus() gdclass.UPNPDeviceIGDStatus
func (Instance) IsValidGateway ¶
Returns [code]true[/code] if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.
func (Instance) QueryExternalAddress ¶
Returns the external IP address of this [UPNPDevice] or an empty string.
func (Instance) ServiceType ¶
func (Instance) SetDescriptionUrl ¶
func (Instance) SetIgdControlUrl ¶
func (Instance) SetIgdOurAddr ¶
func (Instance) SetIgdServiceType ¶
func (Instance) SetIgdStatus ¶
func (self Instance) SetIgdStatus(value gdclass.UPNPDeviceIGDStatus)