SSDP
This is an implementation of the RFC draft from SSDP. However, it should be mostly compatible with the newer UPnP
Feel free to contribute at any point.
Planned features
- Send
M-SEARCH
request - Answer
M-SEARCH
request - Store a list of all services answering
M-SEARCH
- Send ALIVE when service comes up
- Send BYEBYE when service goes down
- Accept header in any order (right now only headers in a pre-defined order are working)
Examples
Service
To launch a Service that listens and answers to M-SEARCH
requests do:
let desc = ServiceDescription ;
let service = new;
service.listen.await;
Client
A client sends a M-SEARCH
request and stores a list of all answering services.
let log = LogConfig;
log.initialize_logger;
let client = default;
client
.discover
.await?;
Now you can fetch a Vec<ServiceDescription>
with all answering services using client.get_services()
License
To be fair this is just a setup I need for another project so feel free to do whatever you like with this. So feel free to choose between:
- Apache License, Version 2.0 apache.org
- MIT License opensource.org
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.