Documentation ¶
Overview ¶
Package discover implements the device discovery protocol.
Index ¶
- Constants
- Variables
- type Address
- type Announce
- type CacheEntry
- type Device
- type Discoverer
- func (d *Discoverer) All() map[protocol.DeviceID][]CacheEntry
- func (d *Discoverer) ExtAnnounceOK() bool
- func (d *Discoverer) Hint(device string, addrs []string)
- func (d *Discoverer) Lookup(device protocol.DeviceID) []string
- func (d *Discoverer) StartGlobal(server string, extPort uint16)
- func (d *Discoverer) StartLocal(localPort int, localMCAddr string)
- func (d *Discoverer) StopGlobal()
- type Query
Constants ¶
View Source
const ( AnnouncementMagic = 0x9D79BC39 QueryMagic = 0x2CA856F5 )
Variables ¶
View Source
var (
ErrIncorrectMagic = errors.New("incorrect magic number")
)
Functions ¶
This section is empty.
Types ¶
type CacheEntry ¶ added in v0.10.2
type Device ¶ added in v0.10.0
func (Device) MarshalXDR ¶ added in v0.10.0
func (*Device) UnmarshalXDR ¶ added in v0.10.0
type Discoverer ¶
type Discoverer struct {
// contains filtered or unexported fields
}
func NewDiscoverer ¶
func NewDiscoverer(id protocol.DeviceID, addresses []string) *Discoverer
func (*Discoverer) All ¶
func (d *Discoverer) All() map[protocol.DeviceID][]CacheEntry
func (*Discoverer) ExtAnnounceOK ¶
func (d *Discoverer) ExtAnnounceOK() bool
func (*Discoverer) Hint ¶
func (d *Discoverer) Hint(device string, addrs []string)
func (*Discoverer) StartGlobal ¶
func (d *Discoverer) StartGlobal(server string, extPort uint16)
func (*Discoverer) StartLocal ¶
func (d *Discoverer) StartLocal(localPort int, localMCAddr string)
func (*Discoverer) StopGlobal ¶
func (d *Discoverer) StopGlobal()
Click to show internal directories.
Click to hide internal directories.