Aseba::Zeroconf derived classes for asynchronous responses
The basic Aseba::Zeroconf
service works synchronously, and will block while waiting for responses from the DNS Service Discovery dæmon. These derived classes implement different mechanisms for detecting asynchronous updates and triggering methods in client classes. Three examples in examples/
illustrate these mechanisms.
Aseba::DashelhubZeroconf
proposes a Dashel::Hub that listens to DNS Service Discovery file descriptors using Dashel::SocketStreams Dashel::PollSocketStreams (introduced in aseba-community/dashel#19) and calls xxxCompleted() methods that can be overridden in derived classes.
Aseba::ThreadZeroconf
uses a std::thread to listen to DNS Service Discovery file descriptors using poll(2) and calls xxxCompleted() methods that can be overridden in derived classes.
Aseba::QtZeroconf
uses QSocketNotifiers within the QT event loop to listen to DNS Service Discovery file descriptors and emit QT signals to which QObject slots may be connected.