Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Interesting note, some devices like WeMo switches don't respond to ssdp:all queries, but will // answer upnp:rootdevice queries. Something to keep in mind, I'm sure it's not the only case DISCOVERY_ADDR_DEFAULT = "239.255.255.250" DISCOVERY_PORT_DEFAULT = 1900 DISCOVERY_TARGET_DEFAULT = "ssdp:all" DISCOVERY_WAIT_MIN_DURATION = 1 * time.Second DISCOVERY_WAIT_MAX_DURATION = 5 * time.Second )
Variables ¶
View Source
var Logger *log.Logger
Functions ¶
func Discover ¶
func Discover(req *SearchRequest, ch chan<- *SearchResponse) error
func ListenNotify ¶
func ListenNotify(ch chan<- *NotifyResponse) error
Types ¶
type Discoverer ¶
type Discoverer interface { Discover(req *SearchRequest, ch chan<- *SearchResponse) ListenNotify(ch chan<- *NotifyResponse) }
type NotifyResponse ¶
type NotifyResponse struct { SSDPResponse NT string NTS string NextBootId int }
type SSDPResponse ¶
type SearchRequest ¶
func NewSearchRequest ¶
func NewSearchRequest() *SearchRequest
type SearchResponse ¶
type SearchResponse struct { SSDPResponse ST string }
Click to show internal directories.
Click to hide internal directories.