UPNPDevice

package
v0.0.0-...-7325ca5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package UPNPDevice provides methods for working with UPNPDevice object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsUPNPDevice() Instance
}

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 New

func New() Instance

func (Instance) AddPortMapping

func (self Instance) AddPortMapping(port int) int

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) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsUPNPDevice

func (self Instance) AsUPNPDevice() Instance

func (Instance) DeletePortMapping

func (self Instance) DeletePortMapping(port int) int

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 (self Instance) DescriptionUrl() string

func (Instance) IgdControlUrl

func (self Instance) IgdControlUrl() string

func (Instance) IgdOurAddr

func (self Instance) IgdOurAddr() string

func (Instance) IgdServiceType

func (self Instance) IgdServiceType() string

func (Instance) IgdStatus

func (self Instance) IgdStatus() gdclass.UPNPDeviceIGDStatus

func (Instance) IsValidGateway

func (self Instance) IsValidGateway() bool

Returns [code]true[/code] if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.

func (Instance) QueryExternalAddress

func (self Instance) QueryExternalAddress() string

Returns the external IP address of this [UPNPDevice] or an empty string.

func (Instance) ServiceType

func (self Instance) ServiceType() string

func (Instance) SetDescriptionUrl

func (self Instance) SetDescriptionUrl(value string)

func (Instance) SetIgdControlUrl

func (self Instance) SetIgdControlUrl(value string)

func (Instance) SetIgdOurAddr

func (self Instance) SetIgdOurAddr(value string)

func (Instance) SetIgdServiceType

func (self Instance) SetIgdServiceType(value string)

func (Instance) SetIgdStatus

func (self Instance) SetIgdStatus(value gdclass.UPNPDeviceIGDStatus)

func (Instance) SetServiceType

func (self Instance) SetServiceType(value string)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL