Simpdiscovery is a simple rust crate to facilitate discovery of services within the Local Area network (LAN) using UDP Broadcast datagrams or "beacons".
The 'announcer' of a service could be a process on another machines, or another threads or process on the same machine.
Run this binary from the repo using cargo run --bin announce
or just announce
if you have installed the
crate with cargo.
It takes an optional command line parameter to specify the String for the beacon message to announce:
cargo run --bin announce -- Hello
Run this binary from the repo using cargo run --bin listen
or just listen
if you have installed the
crate with cargo.
It takes an optional command line parameter to specify the String for the beacon message to wait for before exiting:
cargo run --bin listen -- Hello
Simplest solution Server - sending on background thread (look at implementing 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? - 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
Listener - port sent also? - a protocol field? - to parse any meta-data it must know about the service and know how to parse the format of it's meta-data
Call to wait for a beacon and then run a supplied closure when it is found?