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
-
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), )
Values
pub fn decode_message(content: BitArray) -> Result(Message, Nil)
Parse a received SSDP datagram as a Message