Simpdiscovery is a simple rust crate to facilitate discovery of services on other machines (or other threads or processes on the same machine) in the Local Area network (LAN) using UDP Broadcast datagrams or "beacons".
* Specify sending frequency
* set wait timeout
* add more doc comments
* Filter for beacons received by name
Simplest solution Server - sending on background thread (maybe implement via async and not need to have a thread per beacon, just like a timer?) - start sending other different ones - stop sending a specific beacon - able to send multiple beacons - stop all beacons with one call? - set sending frequency - set name of the service (String) - include an arbitrary Byte sequence to also send as meta-data client must serialize for me so we don't need to include a serialization lib or format
Set TTL of outgoing datagrams?
Listener - can get all beacons and then handle them itself - minimal info is IP, and beacon name, meta-data is optional - port sent also? - a protocol field? - can request beacons matching any of a set of String names and only get notified when is EQUALS, but gets full beacon found with the name - timestamp of when the beacon was sent / received? - to parse any meta-data it must know about the service and know how to parse the format of it's meta-data
Blocking call to wait for a matching beacon, with an optional timeout
Call to wait for a beacon and then run a supplied closure when it is found?
Set TTL for incoming datagrams and if not read in that time then discard them?
to support threads we would need some GUID? not just IP?
additional: can supply an optional regex to match the beacon name
https://crates.io/crates/regex
to filter responses.
Make that feature and the crate inclusion behind a feature to keep the
project as small as possible.