class

Matter::MDNS::Advertiser

Inherits Reference < Object

Advertiser manages the lifecycle of mDNS advertisements

Handles:

  • Broadcasting announcements with exponential backoff
  • Sending goodbye packets on close
  • Integration with commissioning window lifecycle

RFC 6762 ยง8.3: Announcing records

Constants

INITIAL_INTERVAL = 1.seconds

Broadcasting schedule (exponential backoff with jitter)

JITTER_PERCENT = 0.25
Log = ::Log.for("matter.mdns.advertiser")
MAX_BROADCAST_TIME = 15.minutes
MAX_INTERVAL = 90.seconds

Constructors

new(server : Server)
Source
new(family : Socket::Family = Socket::Family::INET)

Convenience constructor that creates server and socket

Source

Instance methods

advertising?

Check if currently advertising

Source
close

Close the advertiser and cleanup

Source
server
Source
server=(server : Server)
Source
start_advertising(advertisement : RecordGenerator) : Nil

Start advertising a service

@param advertisement The advertisement to broadcast

Source
stop_advertising

Stop advertising and send goodbye packets

Source