upnp

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlive

func IsAlive(location, lastUDN string) bool

func SearchDevice

func SearchDevice(waitSec int) ([]ssdp.Service, error)

func SetInterface

func SetInterface(nic *net.Interface)

func SetLogger

func SetLogger(logger *log.Logger)

Types

type RootDesc

type RootDesc struct {
	XMLName     xml.Name `xml:"root"`
	SpecVersion struct {
		Major int `xml:"major"`
		Minor int `xml:"minor"`
	} `xml:"specVersion"`
	Device *struct {
		UDN          string
		DeviceType   string `xml:"deviceType"`
		FriendlyName string `xml:"friendlyName"`
		ModelName    string `xml:"modelName"`
		ServiceList  []*struct {
			ServiceType string `xml:"serviceType"`
		} `xml:"serviceList>service"`
	} `xml:"device"`
}

func GetDesc

func GetDesc(location string) (*RootDesc, error)

type UpnpAds

type UpnpAds struct {
	// contains filtered or unexported fields
}

func SetupAdvertise

func SetupAdvertise(location string, desc *RootDesc, maxAge int) (*UpnpAds, error)

func (*UpnpAds) CloseAll

func (u *UpnpAds) CloseAll()

func (*UpnpAds) NotifyAll

func (u *UpnpAds) NotifyAll() error

func (*UpnpAds) NotifyDevice

func (u *UpnpAds) NotifyDevice() error

func (*UpnpAds) NotifyService

func (u *UpnpAds) NotifyService() error

Jump to

Keyboard shortcuts

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