yell

Core SSDP service and message types; functions to encode and decode datagrams

Types

An SSDP message received from the network. Can be a discovery request, a discovery reply, or a notification.

pub type Message {
  Discovery(
    service_type: uri.Uri,
    max_wait: option.Option(Int),
    other_headers: dict.Dict(String, String),
  )
  Reply(
    service_type: uri.Uri,
    usn: uri.Uri,
    location: option.Option(String),
    max_age: option.Option(duration.Duration),
    other_headers: dict.Dict(String, String),
  )
  Announcement(
    subtype: Status,
    service_type: uri.Uri,
    usn: uri.Uri,
    location: option.Option(String),
    max_age: option.Option(duration.Duration),
    other_headers: dict.Dict(String, String),
  )
}

Constructors

The subtype of an SSDP notification message.

  • Alive - Service is starting up
  • Update - Service configuration has changed
  • ByeBye - Service is shutting down
pub type Status {
  Alive
  Update
  ByeBye
}

Constructors

  • Alive
  • Update
  • ByeBye

Values

pub fn decode_message(content: BitArray) -> Result(Message, Nil)

Parse a received SSDP datagram as a Message

Search Document