yell/listener

OTP Actor that listens for SSDP notifications and replies to discovery requests.

Types

A builder for the SSDP listener

pub opaque type Builder

A received SSDP message with its source IP address:

  • ip - The source IP address (or error if it cannot be determined)
  • content - The parsed SSDP message
pub type Message {
  Message(ip: Result(glip.IpAddress, Nil), content: yell.Message)
}

Constructors

Values

pub fn new(addr: glip.IpAddress) -> Builder

Starts building a listener that will bind to a specific local interface address.

  • addr - The local IP address to listen on (typically the address of a network interface)
pub fn start(
  listener: Builder,
) -> Result(actor.Started(Nil), actor.StartError)

Start the listener actor on both the unicast and multicast SSDP address. The actor will parse incoming SSDP messages and forward them to all subscribed subjects. This actor does not accept any messages.

pub fn subscribe(
  listener: Builder,
  with subscriber: process.Subject(Message),
) -> Builder

Subscribe a subject to receive messages from this listener. Multiple subjects can be subscribed.

Search Document