mdns

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvahiProvider

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

func NewAvahiProvider

func NewAvahiProvider(ifaceIndexes []int32) *AvahiProvider

func (*AvahiProvider) Announce

func (a *AvahiProvider) Announce(serviceName string, port int, txt []string) error

func (*AvahiProvider) Shutdown

func (a *AvahiProvider) Shutdown()

func (*AvahiProvider) Start added in v0.6.0

func (a *AvahiProvider) Start(autoReconnect bool, cb api.MdnsResolveCB) bool

func (*AvahiProvider) Unannounce

func (a *AvahiProvider) Unannounce()

type MdnsManager

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

func NewMDNS

func NewMDNS(
	ski, deviceBrand, deviceModel, deviceType, shipIdentifier, serviceName string,
	port int,
	ifaces []string,
	providerSelection MdnsProviderSelection) *MdnsManager

func (*MdnsManager) AnnounceMdnsEntry

func (m *MdnsManager) AnnounceMdnsEntry() error

Announces the service to the network via mDNS A CEM service should always invoke this on startup Any other service should only invoke this whenever it is not connected to a CEM service

func (*MdnsManager) RequestMdnsEntries

func (m *MdnsManager) RequestMdnsEntries()

func (*MdnsManager) SetAutoAccept

func (m *MdnsManager) SetAutoAccept(accept bool)

func (*MdnsManager) Shutdown

func (m *MdnsManager) Shutdown()

Shutdown all of mDNS

func (*MdnsManager) Start

func (*MdnsManager) UnannounceMdnsEntry

func (m *MdnsManager) UnannounceMdnsEntry()

Stop the mDNS announcement on the network

type MdnsProviderSelection

type MdnsProviderSelection uint
const (
	MdnsProviderSelectionAll            MdnsProviderSelection = iota // Automatically use avahi if available, otherwise use Go native Zeroconf, default
	MdnsProviderSelectionAvahiOnly                                   // Only use avahi
	MdnsProviderSelectionGoZeroConfOnly                              // Only us Go native zeroconf
)

type ZeroconfProvider

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

func NewZeroconfProvider

func NewZeroconfProvider(ifaces []net.Interface) *ZeroconfProvider

func (*ZeroconfProvider) Announce

func (z *ZeroconfProvider) Announce(serviceName string, port int, txt []string) error

func (*ZeroconfProvider) Shutdown

func (z *ZeroconfProvider) Shutdown()

func (*ZeroconfProvider) Start added in v0.6.0

func (z *ZeroconfProvider) Start(autoReconnect bool, cb api.MdnsResolveCB) bool

func (*ZeroconfProvider) Unannounce

func (z *ZeroconfProvider) Unannounce()

Jump to

Keyboard shortcuts

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