Documentation
¶
Index ¶
Constants ¶
View Source
const ( // All is a search type to search all services and devices. All = "ssdp:all" // RootDevice is a search type to search UPnP root devices. RootDevice = "upnp:rootdevice" UpnpMediaRenderer = "urn:schemas-upnp-org:device:MediaRenderer:1" )
Variables ¶
View Source
var Interfaces []net.Interface
Interfaces specify target interfaces to multicast. If no interfaces are specified, all interfaces will be used.
Functions ¶
func SetMulticastRecvAddrIPv4 ¶
SetMulticastRecvAddrIPv4 updates multicast address where to receive packets. This never fail now.
func SetMulticastSendAddrIPv4 ¶
SetMulticastSendAddrIPv4 updates a UDP address to send multicast packets. This never fail now.
Types ¶
type MediaRenderer ¶
type MediaRenderer struct {
XMLName xml.Name `xml:"root"`
Device struct {
UDN string `xml:"UDN"`
FriendlyName string `xml:"friendlyName"`
ModelDescription string `xml:"modelDescription"`
ModelName string `xml:"modelName"`
Manufacturer string `xml:"manufacturer"`
} `xml:"device"`
XDevice struct {
UrlBase string `xml:"X_URLBase"`
ControlUrl string `xml:"X_YxcControlURL"`
} `xml:"X_device"`
}
func GetMediaRenderer ¶
func GetMediaRenderer(device *Service) (*MediaRenderer, error)
func (*MediaRenderer) String ¶
func (s *MediaRenderer) String() string
type Service ¶
type Service struct {
// Type is a property of "ST"
Type string
// USN is a property of "USN"
USN string
// Location is a property of "LOCATION"
Location string
// Server is a property of "SERVER"
Server string
// contains filtered or unexported fields
}
Service is discovered service.
Click to show internal directories.
Click to hide internal directories.